Title | 3 - chapter 3 |
---|---|
Author | Chung cxchen |
Course | Problem Solving & Prgmng I Lab |
Institution | Old Dominion University |
Pages | 4 |
File Size | 131.5 KB |
File Type | |
Total Downloads | 115 |
Total Views | 205 |
chapter 3...
Test 3
1.
2.
3.
4.
5.
6.
7.
To force floating-point output to show the decimal point and trailing zeros, use the ________ manipulator. a. decimal b. point c. showpoint d. scientific The result of attempting to read invalid data is ________ . a. input failure b. user error c. read failure d. syntax error I/O functions are typically called ________ member functions. a. user b. stream c. access d. common The output stream variables can use the manipulator ________ to fill the unused columns with a character other than a space. a. setfill b. setchar c. charfill d. setw Variables of type ________ are called input stream variables. a. stream b. istream c. ostream d. iostream A ________ is an area in secondary storage used to hold information. a. sector b. variable c. member d. file The manipulator ________ is used to output floating-point numbers in scientific format.
8.
9.
10.
11.
12.
13.
14.
a. fixed b. scientific c. sets d. setsci The extraction operator takes ________ operands. a. one b. zero c. two d. three The fstream header file contains the definitions of two data types: ________ and ofstream. a. istream b. ifstream c. ostream d. fstream To read a string containing blanks, you can use the function ________ . a. getstring b. get c. getline d. readline An input stream is a sequence of characters from a(n) ________ to the computer. a. input device b. operator c. output stream d. parameter Which of the following is not an input stream function? a. ignore b. get c. place d. putback The ________ manipulator controls the output of only the next expression. a. showpoint b. setprecision c. setw d. fixed Another name for function arguments is function ________ .
15.
16.
17.
18.
19.
20.
a. manipulators b. members c. parameters d. streams To left-justify output in C++, use the ________ manipulator. a. setcolumn b. setleft c. left d. justify In C++, the default output of floating-point numbers is ________ notation. a. exponential b. dot c. fixed d. scientific Dot notation is used to separate a(n) ________ from its member, or function, name. a. output stream variable name b. input stream variable name c. manipulator name d. member access operator In C++, the dot is an operator called the ________ . a. dot notation operator b. manipulator name c. input stream variable d. member access operator You can use the ________ function to restore an input stream to a working state. a. flush b. clear c. ignore d. init To use a parameterized stream manipulator in a C++ program, you must include the header file ________ a. iostream b. iomanip c. string d. fstream ...