Computer Science, asked by ajaiearthmovers, 10 months ago

write a C program to find the length of the string​

Answers

Answered by brainy5159
1

Answer:

#include <stdio.h>

#include <string.h>

int main()

{

char a[100];

int length;

printf("Enter a string to calculate its length\n");

gets(a);

length = strlen(a);

printf("Length of the string = %d\n", length);

return 0;

}

Answered by Soñador
0

Answer:

#include<constream.h>

#include<string.h>

void main()

{

clrscr();

char a[20];

int l;

cout<<"\n Enter any name";

cin>>a;

l=strlen(a);

cout<<"\n Length of array:"<<l;

getch();

}

Similar questions