I've entered my programming class' exam where i've encountered a question in which i was asked to interpret what would the result of the code block written in C would be and the code block is as follows...
#include <stdio.h>
int main(void)
{
int x = 1, y = 1;
for (; y; printf("%d %d |", x,
y))
y = x++ <= 5;
printf("\n");
return 0;
}
What struck me ass odd is that a comparison operator (=<) is put inside the body of the for loop instead of the condition-test part of the for loop. Could you explain what it does? I tried to be as descriptive as i can, hope you understood well.