# Include <stdio. h> int main (void) {char * str = "123456789"; char p [10] = {0}; char t [10] = "123 "; char a [10] = {'1', '2', '3', '4', '5', '\ 0', '7 ', '8'}; char B; int c; long d; double e; printf ("% d \ n", sizeof (B); // 1 [Note: variable type] printf ("% d \ n", sizeof (c); // 4 printf ("% d \ n", sizeof (d )); // 4 printf ("% d \ n", sizeof (e); // 8 printf ("% d \ n", sizeof (str )); // 4 printf ("% d \ n", strlen (str); // 9 [Note: Calculate the string length, not including '\ 0'] printf ("% d \ n", sizeof (p); // 10 printf ("% d \ n", strlen (p )); // 0 printf ("% d \ n", sizeof (t); // 10 printf ("% d \ n", strlen (t )); // 3 printf ("% d \ n", sizeof (a); // 10 printf ("% d \ n", strlen ()); // 5 printf ("% d \ n", sizeof (a [1]); // 1 printf ("% d \ n ", strlen (& a [1]); // 4 [Note: From '2' to '\ 0'] return 0 ;}
, Strlen is.
, Passed to strlen.
, Strlen can only be used, and must be