I'm pretty sure this this piece of code gives me an infinite loop, (I have left if for a very long time and nothing happens), and I've been starring at this for 2 days now and i don't have a clue why it keeps looping. Any ideas?
int r = 0;
int H = 0;
int g = 0;
while (r < (3265920)) {
while (g < 79338) {
//printf("middle");
if (!strcmp(arr1[g], Arr2[r])) {
strcpy(out[H], arr1[g]);
H++;
}
g++;
}
r++;
g = 0;
}
Q=0;
while (Q < 79338) {
printf("%d: %s\n",Q, Ans[Q]);
Q++;
}
All the arrays have the correct memory allocation outside the main.
static char arr2[NINE_FACT * 9][10];
char Ans[79339][10];
char arr1[79339][45];