#can someone explain this
10 messages · Page 1 of 1 (latest)
b1 = 1
b2 = 3
b1 = b2 // b1 is now 3 (value of b2)
b2 = b1 // b2 is now 3 (new value of b1)
bsc b1 is 1
Then b1 changes to b2 (3)
10 messages · Page 1 of 1 (latest)
#include <iostream>
using namespace std;
int main() {
int b1, b2;
b1 = 1;
b2 = 3;
b1 = b2;
b2 = b1;
printf("%d %d\n", b1, b2);
}
why the output is 3 3 why not 3 1 or 1 1 ?
pls explain 😿
b1 = 1
b2 = 3
b1 = b2 // b1 is now 3 (value of b2)
b2 = b1 // b2 is now 3 (new value of b1)
bsc b1 is 1
Then b1 changes to b2 (3)