use sizeof for char* c code example Example: c print sizeof char char b = 'b'; printf("the size of b is %d",sizeof(b));