J
jaffarkazi
The code is:
int x = 15;
printf("%d %d\n", (x != 15), (x = 1));
x = 15;
printf("%d %d\n", (x = 1), (x != 15));
The output is:
1 1
1 1
If the , operator goes from right to left, then one of the cases
should give the o/p of (x != 15) as 0.
Regards,
--Jaffar
int x = 15;
printf("%d %d\n", (x != 15), (x = 1));
x = 15;
printf("%d %d\n", (x = 1), (x != 15));
The output is:
1 1
1 1
If the , operator goes from right to left, then one of the cases
should give the o/p of (x != 15) as 0.
Regards,
--Jaffar