I want to find the length of this :
char *s[]={\"s\",\"a\",\"b\"};
it should count 4 with the /0 but the strlen or sizeof(s)/sizeof(char) gives
You are making an array of char* and not of char. That's why strlen won't work. Use
char*
char
strlen
sizeof(s) / sizeof(char*) //should give 3
If you want a single string use
char s[] = "sab";