How can I iterate over a char ** array? And how can I get the value of each position (get the key1, key2, key3)? I have this:
// Online C compiler to run C program online
#include <stdio.h>
#include <string.h>
int main() {
char **tree_keys = {"key1","key2","key3"};
printf("Key = %s\n", tree_keys);
int size = 0;
int i =0;
while(tree_keys[i] != '\0'){
size++;
i++;
}
printf("%s", size);
return 0;
}```
it returns segmentation fault