I have the following C block of code with two while loops.
#include <stdio.h>
int main()
{
int a = 0, b = 0;
while (a++ <= 3)
{
printf("cycle a = %d\n", a);
}
while (++b <= 3)
{
printf("cyclo b = %d\n", b);
}
return 0;
}
The output for the first while is:
ciclo a = 1
ciclo a = 2
ciclo a = 3
ciclo a = 4
The output for the second while is:
ciclo b = 1
ciclo b = 2
ciclo b = 3
What`s the reason for the different results in the while loops?