Please have a look at the following code:
#include <stdio.h>
void main(){
int i = 2;
i = i++;
printf("%d",i);
}
I expected the answer to be 3, but it comes out to be 2. Could someone please explain why?
Please have a look at the following code:
#include <stdio.h>
void main(){
int i = 2;
i = i++;
printf("%d",i);
}
I expected the answer to be 3, but it comes out to be 2. Could someone please explain why?