I have a question:
Why does (a == b == c) inside if statement in C not work?
For example, I have this code:
int naxes1[1] = {6};
int naxes2[1] = {6};
int naxes3[1] = {6};
if (naxes1[0] == naxes2[0] == naxes3[0])
printf("first doesnot work\n");
if (naxes1[0] == naxes2[0] && naxes1[0]== naxes3[0])
printf("second works\n");
why?
I went through following links:
Usage of greater than, less than operators