#can someone explain this

10 messages · Page 1 of 1 (latest)

fathom bolt
#

#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 😿

fallow yoke
fathom bolt
#

why not 1?

#

is it because we have to take biggest number or what

fallow yoke
#

Why would it be 1?

#

You are directly setting values of variables

fathom bolt
#

bsc b1 is 1

fallow yoke
#

Then b1 changes to b2 (3)

fathom bolt
#

OHHHHHHHHHHHHHHHHHHH

#

I SEEEEEEEEEEEEEEEEEEEEEEE