For a char [], I can easily get its length by:
char []
char a[] = \"aaaaa\"; int length = sizeof(a)/sizeof(char); // length=6
However,
If the char * is 0-terminated, you can use strlen
char *
strlen
Otherwise, there is no way to determine that information