Answers for "how to find length of char* in c++"

C++
3

c++ length of char*

#include <iostream>
#include <string.h>

using namespace std;

int main()
{
    char *str = "ABC";
    cout << strlen(str) << endl;
    return 0;
}
Posted by: Guest on August-01-2020
0

char size length c++

char* a = "ABC";
int length = sizeof(a)/sizeof(char);
Posted by: Guest on July-05-2020

Code answers related to "how to find length of char* in c++"

Browse Popular Code Answers by Language