New course! Every coder should learn Generative AI!
Try a free lesson+ 1
What is the output of the following code? int a=3; int b=2; b=a++; cout<<++b;
4 Answers
+ 6
int a=3;
int b=2;
b=a++; // b is 3 and a is 4
cout<<++b; // b is 4 because preincrement
+ 5
4 lol
+ 1
4
0
4