+ 2
What is output of the following c++ code?
#include<iostream> using namespace std; int main() { int a=5,b=10; int c=++a*b--; cout<<c*b; return 0; }
3 Answers
+ 4
540
a became 6 thn multiplied with 10 gives 60
now value of b decreases and became 9
c=c*b = 60*9=540
+ 2
Correct...
+ 1
540