I have the following code:
int main() {
char** a = {"bob", "alex", "john"};
for (int i = 0; i < 3; i++) {
printf('%d', sizeof(a[i]));
}
}
What I try to do here, is to initialize an array of string, iterate through it and print the size for each word of it. But I get segmentation error. What is wrong with my approach ?