write a program to compute the length of string
Answers
Answered by
2
Answer:
Explanation:
String length C program
#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 the string = %d\n", length);
return 0;
}
Similar questions