#include<stdio.h>
int main(){
char*s[]={"we will teach you how to","Move a mountain","Level a building","Erase the past","Make a million"};
printf("%u",sizeof(s));
return 0; }
Running this will output 20. Shouldn't the size be = no.of elements in each array x no of arrays x sizeof(char)? Also sizeof(s+1) prints 4 bytes. Furthermore, how can I obtain the number of pointer arrays and no. of elements in each pointer array from the above mentioned code without hard coding?