#include <stdio.h>
void main()
{
char s[1000],i;
clrscr();
printf("Enter a string: ");
scanf("%s",s);
for(i=0; s[i]!='\0'; ++i);
printf("Length of string: %d",i);
getch();
}
void main()
{
char s[1000],i;
clrscr();
printf("Enter a string: ");
scanf("%s",s);
for(i=0; s[i]!='\0'; ++i);
printf("Length of string: %d",i);
getch();
}
ReplyDeletenice article for beginners.thank you.
javacodegeeks
welookups