Exam 3: Inputoutput
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures Ii Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
Suppose that alpha, beta, and gamma are int variables and the input is:What is the value of gamma after the following statements execute? cin >> alpha;
Cin)ignore(100, '\n');
Cin >> beta;
Cin)ignore(100,'\n');
Cin >> gamma;


Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
C
The following statements will result in input failure if the input values are not on a separate line.(Assume that x and y are int variables.)
cin >> x;
cin >> y;
Free
(True/False)
4.7/5
(28)
Correct Answer:
False
Suppose that x and y are int variables, ch is a char variable, and the input is:4 2 A 12 Choose the values of x, y, and ch after the following statement executes:cin >> x >> ch >> y;
Free
(Multiple Choice)
4.9/5
(44)
Correct Answer:
D
The function ____________________ returns the next character in the input stream; it does not remove the character from the input stream.
(Short Answer)
4.9/5
(39)
When you want to process only partial data, you can use the stream function ____ to discard a portion of the input.
(Multiple Choice)
4.8/5
(40)
Suppose that x = 1565.683, y = 85.78, and z = 123.982.What is the output of the following statements? 

(Multiple Choice)
4.8/5
(44)
Suppose that x is an int variable, y is a double variable, and z is an int variable.The input is: 15 76.3 14
Choose the values after the following statement executes:
Cin >> x >> y >> z;
(Multiple Choice)
4.9/5
(41)
Suppose that x and y are int variables, and z is a double variable.The input is: 28 32.6 12
Choose the values of x, y, and z after the following statement executes:
Cin >> x >> y >> z;
(Multiple Choice)
4.9/5
(36)
Suppose that ch1, ch2, and ch3 are variables of the type char.The input is: A B
C
Choose the value of ch3 after the following statement executes:
Cin >> ch1 >> ch2 >> ch3;
(Multiple Choice)
4.8/5
(37)
The extraction operator >> skips only all leading blanks when searching for the next data in the input stream.
(True/False)
4.9/5
(42)
Suppose that x = 25.67, y = 356.876, and z = 7623.9674.What is the output of the following statements? 

(Multiple Choice)
4.8/5
(31)
Suppose that ch1 and ch2 are char variables and the input is:WXYZ What is the value of ch2 after the following statements execute?
Cin >> ch1;
Ch2 = cin.peek();
Cin >> ch2;
(Multiple Choice)
4.8/5
(36)
You can use the function getline to read a string containing blanks.
(True/False)
4.8/5
(42)
If input failure occurs in a C++ program, the program terminates immediately and displays an error message.
(True/False)
4.8/5
(36)
C++ provides a header file called ____________________, which is used for file I/O.
(Short Answer)
4.9/5
(38)
In the statement cin >> x;, x can be a variable or an expression.
(True/False)
4.7/5
(34)
Suppose that x = 55.68, y = 476.859, and z = 23.8216.What is the output of the following statements? 

(Multiple Choice)
4.8/5
(31)
C++ has a special name for the data types istream and ostream.They are called ____________________.
(Short Answer)
4.8/5
(43)
Showing 1 - 20 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)