find the length of the string using c++ program
Answers
Answered by
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
#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
Computer Science,
3 months ago
Math,
3 months ago
India Languages,
3 months ago
Science,
7 months ago
Math,
11 months ago
Chemistry,
11 months ago