Develop a C program to find the length of the string (Note: use gets(), puts(), and strlen()) using string functions
Code
#include<stdio.h>#include<string.h>int main(){char str[100];int len;puts("Enter string: ");gets(str);len = strlen(str);printf("Length is: %d\n", len);}
Output
Enter your name and comment your name length lol
0 Comments
Post a Comment