Can anyone explain to me why the following code:
#include <iostream>
using namespace std;
int main() {
int y=3;
int z = (--y) + (y=10);
printf("%d \n", z);
}
prints out z=20
? I thought it should be z=19
instead?
Can anyone explain to me why the following code:
#include <iostream>
using namespace std;
int main() {
int y=3;
int z = (--y) + (y=10);
printf("%d \n", z);
}
prints out z=20
? I thought it should be z=19
instead?