Q.

What is the output of the folloeing code?
#include <iostream>
using namespace std;
int main()
{
int a = 10, b = 20;
a = a++;
b = ++b;
cout << a << b;
return 0;
}

A. 2.2
B. 2
C. 2
D. conversion from double to int is not possible
Answer» B. 2
2.4k
0
Do you find this helpful?
1

Discussion

No comments yet