Vidyalelo
C++ Programming · Q47

Classes and Objects in C++

Programming · C++ Programming · question 47

Q47

What will be the output of the following C++ code? #include using namespace std; int main () int a, b; a = 10; b = 4; a = b; b = 7; cout << "a:"; cout << a; cout << " b:"; cout << b; return 0;

A.
a:4 b:7
Answer
B.
a:10 b:4
C.
a:4 b:10
D.
a:4 b:6

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board