English, asked by ramachandran7788031, 7 months ago

find the length of the string using c++ program

Answers

Answered by saicharan2003
0
To get the length of a C-string string, strlen() function is used.

#include
#include
using namespace std;

int main()
{
char str[] = "C++ Programming is awesome";

// you can also use str.length()
cout << "String Length = " << strlen(str);

return 0;
}


Output

String Length = 26


Hope you got the answer please mark as brainlist
Similar questions