Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which of the following is not an output manipulator? Setfill fixed right clear S

ID: 3861243 • Letter: W

Question

Which of the following is not an output manipulator? Setfill fixed right clear Suppose that alpha and beta are int variables. The statement alpha = ++beta: is equivalent to statement(s) ______. Alpha = 1 + beta: alpha = beta + 1: beta = beta + 1: alpha = beta: alpha = beta: beta = beta + 1: Suppose a is int variable, b and c are a double variable where a = 5, b = 15.5, and c = 17.5. What is the output of the statement: c = static_cast (b) % 5 + a 22 22.5 19.5 21.5 Suppose that x is int, y and z are double variables, and the input is: 28.2 32 3.16A Choose the values of x, y, and z after the following statement executed: cin > > x > > y > > z: x = 28, y = 2, z = 32 x = 28, y = 0.2, z = 32 x = 28.2, y = 32, z = 3.16A x = 28, y = 32.0, z = 3.16 Which of the following expression evaluates false? (1.0 > 5) | | ('C' 5) && ('C' 'D') ('D' > 'C') && ('C' > 'B')

Explanation / Answer

1) which of the following is not an output manipulator?

ANSWER : Option (D) ---- clear

because

2) Suppose that alpha and beta are int variables. The statement alpha = ++beta; is equivalent to the statement(s) ____.
ANSWER : Option ( C) --------- beta = beta + 1; (Pre-increment)
alpha = beta;

Pre-increment means first increment the value then that the value will be stored into the variable.

sample examples are :

case-1 : The statement alpha = beta++; (Post-increment)

ANS: alpha = beta;
beta = beta + 1;

case 2: The statement alpha = --beta; (pre-decrement)
ANS : beta = beta - 1;
alpha = beta;

case 3: . The statement alpha = beta--; (post-decrement)
ANS : alpha = beta;
beta = beta - 1;

3) suppose a is int variable, b and c are double variable where a = 5, b = 15.5, and c = 17.5. what is the output of the statement: c - static_cast<int> (b) % 5 + a
ANSWER : Option (B) -- 22.5

Explanation : static_cast<int>(b) means type casting i.e., the float value 'b' will be converted into integer value as b = 15

sothat 17.5 - 15 % 5 + 5

=> 17.5 - 0 + 5

=> 22.5
4) suppose that x is int, y and z are double variables and the input is:
28.2 32 3.16A
choose the values of x,y and z after the following statement executes:
cin >> x >> y >> z;

ANSWER : Option ( D )

x = 28, y = 32.0 z = 3.16

Explanation : Here 'x' is an integer value sothat it takes only integer value

'y' and 'z' are double variables sothat those variables are able take integer values also

therefore the ANSWER might be Option (A) and (B) also.

5) which of the following expression evaluates false?
a) (10 > 5) || ('C' < 'D')
b) (10 > 5) || ('C' < 'B')
c) !('C' > 'D')
d) ('D' > 'C') && ('C' > 'B')

ANSWER :Option (D) --- ('D' > 'C') && ('C' > 'B')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote