Check out example codes for "c++ length of char*". It will help you in understanding the concepts better.

Code Example 1

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

using namespace std;

int main()
{
    char *str = "ABC";
    cout << strlen(str) << endl;
    return 0;
}

Code Example 2

char* a = "ABC";
int length = sizeof(a)/sizeof(char);

Learn ReactJs, React Native from akashmittal.com