Length of a Given Sentence C Program Code

C – Length of a Given Sentence C Program Code

#include
#include
#include
void main()
{
char s[20];
int z;
clrscr();
printf(“ntEnter a sentence:”);
gets(s);
z=strlen(s);
printf(“ntLength of given sentence is:%d”,z);
getch();
}

Add Comment