Can I ask why it shows me "Zero" instead of index?
Current output: 0
Expected output: 6
#include<stdio.h>
#include<stdlib.h>
int main() {
int index_equal;
char array[20] = {"2n+n2n=n4n"};
for (int j = 0; j > 20; j++) {
if (array[j] == '=') {
index_equal = j;
}
}
printf("\n%d", index_equal);
}