+ 2
What is the output
Int X=2; x= x++*x; Cout<<x; and in line x=x++*x; the last x =? Thanks...
3 Antworten
+ 5
6
Explanation:
x = x++ * x
first x++ will assign value, then incremented by 1 so x will be 3
finally x = 2 * 3 = 6
+ 1
Here given that =2
Then X asign the value of post increment of x (x++)
It mean x=2*3
Then finally x =6 will be output
0
6