Mega Code Archive

 
Categories / C / String
 

Get the string length

#include <stdio.h> #include <string.h> int main(void) {   char str[80];   gets(str);   printf("Length is %d", strlen(str));   return 0; }