i have this code :
int main(int re, char *args[]){
int comp=1;
int j=2;
int count=0;
//printf("%d",args[1]);
while(comp!=0){
comp=strcmp(args[j],"null");
j++;
count++;
}
}
and i want to see how many string i have in my argument array (args[]), the problem is that a take segmentation fault and i cant find why. When i put NULL instead "null" i get the same result ,segmentation fault. There is a problem with args[j]? or is something else that i dont see? Iam getting out of bounce in my array? i know that the strings begin from args[2] so this is why i put j=2 in the code i put the header file #include to use strcmp