C program to find the length of a string C Programming Friday, May 15, 2015 Reading Add Comment string_length.c #include <stdio.h> #include <string.h> int main() { char a[100]; int length; printf("Enter a string to calculate it's length\n"); gets(a); length = strlen(a); printf("Length of entered string is = %d\n",length); return 0; } Output Enter a string to calculate it's length DheerajSinghBhadoria Length of entered string is = 20 C Programming C Programs Share: Facebook Twitter Google Plus Pinterest Related Articles
0 comments:
Post a Comment