It is my understanding that the following code segment (in C) is valid:
int a, b, c;
a = 1;
b = 1;
c = 1;
if (a == b == c)
printf("AT-HT");
This code, when run should print AT-HT. However, with the compiler my university uses, if a, b and c are set to -1, the IF statement is not taken. Is this a bug in the compiler or is it my misunderstanding of the C language?
Thanks and Peace,
Will
int a, b, c;
a = 1;
b = 1;
c = 1;
if (a == b == c)
printf("AT-HT");
This code, when run should print AT-HT. However, with the compiler my university uses, if a, b and c are set to -1, the IF statement is not taken. Is this a bug in the compiler or is it my misunderstanding of the C language?
Thanks and Peace,
Will
