What is the answer to this C program?
int array[]={1,2,3,4,5,6,7,8};
#define SIZE (sizeof(array)/sizeof(int))
main() {
if(-1<=SIZE) printf("1");
else printf("2");
}
Here, I can see that the value of SIZE would be 8 and the if condition is if(-1<=SIZE), which is true. So theoretically the output should be 1 but when i execute the program on my pc, it says the answer is 2. How and why?? Please explain clearly.. Thank you!