Computer Science, asked by gokulkrishna21, 6 months ago

Write a C++ program to find length of a given string. ​

Answers

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