Computer Science, asked by niharikav633, 10 months ago

write a program to compute the length of string​

Answers

Answered by rohitrt2004
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