132k views
5 votes
Given the following code segment, what is output after "result = "? int x = 1, y = 2, z = 3; cout << "result = " << (x < y ? y : x) << endl;

a. 1
b. 2
c. 3
d. 4

1 Answer

3 votes

Answer:

b. 2

Step-by-step explanation:

User Zarina
by
5.1k points