Given the following code segment, what is the output?

int x = 1, y = 1, z = 1;
y = y + z;
x = x + y;
cout << "result = " << (x < y ? y : x) << endl;

a. result = 0
b. result = 1
c. result = 2
d. result = 3
e. there will be no output


d. result = 3

Computer Science & Information Technology

You might also like to view...

Emily, a professor, uses Microsoft Access 2016 to manage student information. She refines queries to display selected records and enters criteria using operators to filter the records and display required information. To retrieve the details of all the students with an Age field value greater than 21 but less than or equal to 24, Emily should enter _____ in the Criteria row in the Age column in the design grid.

A. ?>21 || <24 B. ?Between 21 And 24 C. ?From 21 to 24 D. ?21 && 24

Computer Science & Information Technology

When you create a document in Word, you can display it in Web Layout view

Indicate whether the statement is true or false

Computer Science & Information Technology

The Quick Access Toolbar can be customized through the ________

A) Home tab B) Insert tab C) Excel Options D) Add-ins tab

Computer Science & Information Technology

A mainframe terminal has data in one format and a workstation has data in another format. Both devices can communicate across a network with the help of the _______ OSI model layer because this layer translates from one language to another

Fill in the blank(s) with correct word

Computer Science & Information Technology