#include<stdio.h>
#include<conio.h>
#include<string.h>
void main(void)
{
int i,k,n;
char name[50],temp;
printf("\n enter no.of persons");
scanf("%d",&n);
for(i=0;i<n;i++)
gets(name[i]);
for(k=0;k<n-1;k++)
{
for(i=0;i<n-k-1;i++)
{
if(strcmp(name[i],name[i+1])>0)
{
strcpy(temp,name[i]);
strcpy(name[i],name[i+1]);
strcpy(name[i+1],temp);
}
}
}
printf("\n sorted list \n");
for(i=0;i<n;++i)
puts(name[i]);
}
what is string
i dont no string for servlate
.... 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 ]
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.