Strlen tells us how many characters are in a given string excluding the null terminator - C++ Data Type

C++ examples for Data Type:char array

Description

Strlen tells us how many characters are in a given string excluding the null terminator

Demo Code

#include <iostream> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        char* cStyleString = "CStyleString"; 
        cout << strlen(cStyleString) << endl; 
  
        return 0; 
}

Result


Related Tutorials