Write a C++ program to find length of a given string.
Answers
Answered by
2
Answer:
#include<iostream>
#include<string.h>
using namespace std;
int main ()
{
char str[50];
int len;
cout << "Enter an array or string : ";
gets(str);
len = strlen(str);
cout << "Length of the string is : " << len;
return 0;
}
Explanation:
HOPE THIS HELPS
PLEASE MARK ME AS BRAINLIST
Similar questions