#include<stdio.h>
#include<conio.h>
void main()
{
int i,l=0;
char c[30];
clrscr();
printf("enter your name=");
scanf("%s",c);
for(i=0;c[i]!='\0';i++)
{
l++;
}
printf("the length of %s is =%d",c,l);
getch();
}
/* output
enter your name=asdfghjkl
the length of asdfghjkl is =9
*/
Tweet
Comments
Post a Comment