I have the following char** that I'm trying to get data about:
using gdb I get a seg fault on the while loop. trying to incure about '*a' after incrementing shows it has address 0x00
couldn't find explanation to it on google
Code:
int print_word_count(char **argv) {
int count = 0;
char **a = argv;
while(a++){
printf("%s\n",*a);
++count;
}
printf("The sentence contains %d %s.\n", count, words(count));
return count
couldn't find explanation to it on google
Comment