strlen() string length in C.

 

01  #include <stdio.h>
02 #include <string.h>
03
04 int main()
05 {
06
07 char s[80];
08 int i;
09 printf("Enter the string : ");
10 gets(s);
11 i = strlen(s);
12 printf("The length of the string is %d.", i);
13
14 return 0;
15
16 }
 
 OUTPUT :

Enter the string : SITS Educators

The length of the string is 14.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.