I’m tasked with changing a C program to x86 asm, and this line is confusing me:
int x; arr[100]
Full program:
int max = 100;
int val = 0x7a;
int x, arr[100]; /*I have a feeling that it is in fact a typo, and my compiler was just being nice*/
main(){
x = 1;/*I just got an email saying this was an error*/
for (x = 1; x <= max; x++){
arr[x] = val;
}
}
I think it means an array, but I’m not sure.
It is an array of
int. Before C99 in certain circumstances the type could be omitted in a declaration and thenintwas assumed. (Note that you are missing a;after the declaration of your array in your example).For example: