Solved

Given the Following Code Segment, What Is Output After "Result

Question 40

Multiple Choice

Given the following code segment, what is output after "result = "? int x = 1, y = 1, z = 1;
y= y + z;
x = x + y;
cout << "result = " << (x < y ? y : x) << endl;


A) 0
B) 1
C) 2
D) 3
E) None of these

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions