0
Plz tell me why the output is 16 ? I thought it would be 12
#include <iostream> using namespace std; int main() { int a=2; int b=++a; int c=++b; a=b*c; cout<<a; return 0; } Plz explain 🙏
2 odpowiedzi
+ 4
#include <iostream>
using namespace std;
int main() {
int a=2;
int b=++a; //b=3, a=3
int c=++b; //c=4, b=4
a=b*c;// a=4*4=16
cout<<a;
return 0;
}
+ 2
Arun Ruban SJ Ok... Got it 👍
Thanks for explaining