#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char a[30],temp;
int n=0,j,i;
clrscr();
printf("Enter the string\n");
gets(a);
while(a[n]!='\0')
{
n++;
}
for(i=0;i<n;i++)
{
for(j=0;j<n-i-1;j++)
{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("The string in alphabetical order is\n");
for(i=0;i<n;i++)
{
printf("%c",a[i]);
}
getch();
}
what is string
i dont no string for servlate
i am sam
This is an assignment not a question.
what is if(!(str[i]==32))
.... String line = "This is example program with spaces"; String[] tokens = line.split(" "); System.out.println(tokens.length-1); .......
what is if(!(str[i]==32))
[ string toupper $str ] or [ string tolower $str ]
No.
final String[] days = new String[] {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.
This is not a question.