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:
Verified
Q3: This operator takes an operand and reverses
Q9: If you place a semicolon after the
Q23: What is the value of the following
Q25: Which statement allows you to properly check
Q26: What will the following program display?
Q26: In C++ the = operator indicates:
A)equality
B)assignment
C)subtraction
D)negation
E)None of
Q28: What is the value of the following
Q32: This operator performs a logical NOT operation.
A)--
B)!
C)<>
D)><
E)None
Q34: The _ of a variable is limited
Q37: The default section of a switch statement
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents