Guess the output of the code if the input is sookshmas ?
#includestdio.h
#includeconio.h
void main()
{
char str[50];
int i,n;
printf("Enter the string\n");
gets(str);
for(i=0;str[i]!=0;i++)
{
n = i;
}
printf("The length of the string is = %d\n",n+1);
}

Posted on by