Starting out with c++ from control structures through objects brief version 8th edition gaddis test

Page 1

Test Bank for Starting Out with C++ From Control Structures through Objects Brief Version 8th Edition Gaddis 0134037324 9780134037325 Full download link at: Test bank: https://testbankpack.com/p/test-bank-for-starting-out-with-c-from-controlstructures-through-objects-brief-version-8th-edition-gaddis-01340373249780134037325/ Starting Out with C++ from Control Structures to Objects, 8e (Gaddis) Chapter 5 Loops and Files 5.1 Multiple Choice Questions 1) These are operators that add and subtract one from their operands. A) plus and minus B) ++ and -C) binary and unary D) conditional and relational E) None of these Answer: B 2) What is the output of the following code segment?

n = 1; while (n <= 5) cout << n << ' n++;

';

A) 1 2 3 4 5 B) 1 1 1... and on forever C) 2 3 4 5 6 D) 1 2 3 4 E) 2 3 4 5 Answer: B 3) This operator increments the value of its operand, then uses the value in context. A) prefix increment B) postfix increment C) prefix decrement D) postfix decrement E) None of these Answer: A 4) The while loop has two important parts: an expression that is tested for a true or false value, and: 1 Copyright © 2015 Pearson Education, Inc.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.