Exam 3: Input/Output
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the string Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
In C++,the dot is an operator called the ____________________operator.
Free
(Short Answer)
4.9/5
(43)
Correct Answer:
member access
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.7/5
(45)
Correct Answer:
D
In the C++ statement,
cin.get(u);
u must be a variable of type ____________________.
Free
(Short Answer)
4.7/5
(37)
Correct Answer:
char
To use the manipulator setprecision,the program must include the header file ____________________.
(Short Answer)
4.8/5
(30)
C++ provides a header file called ____________________,which is used for file I/O.
(Short Answer)
4.8/5
(45)
Suppose that outFile is an ofstream variable and output is to be stored in the file outputData.out.Which of the following statements opens the file outputData.out and associates outFile to the output file?
(Multiple Choice)
4.9/5
(35)
You can use the function getline to read a string containing blanks.
(True/False)
4.7/5
(26)
Suppose that x = 1565.683,y = 85.78,and z = 123.982.What is the output of the following statements?
cout << fixed << showpoint;
Cout << setprecision(3)<< x << ' ';
Cout << setprecision(4)<< y << ' ' << setprecision(2)<< z << endl;
(Multiple Choice)
4.7/5
(36)
The function ____________________ returns the next character in the input stream; it does not remove the character from the input stream.
(Short Answer)
4.8/5
(39)
Suppose that x is an int variable,y is a double variable and ch is a char variable and the input is: 15A 73.2
Choose the values after the following statement executes:
Cin >> x >> ch >> y;
(Multiple Choice)
4.9/5
(27)
To use a parameterized stream manipulator in a program,you must include the header file ____________________.
(Short Answer)
4.9/5
(35)
The extraction operator >> skips only all leading blanks when searching for the next data in the input stream.
(True/False)
4.8/5
(40)
On some compilers,the statements cin >> fixed; and cin >> scientific; might not work.In this case,you can use the statement ____________________ in place of cin >> fixed;.
(Short Answer)
4.7/5
(32)
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.7/5
(33)
The manipulator ____________________ is used to output the value of an expression in a specific number of columns.
(Short Answer)
4.8/5
(36)
Suppose that x = 55.68,y = 476.859,and z = 23.8216.What is the output of the following statements?
cout << fixed << showpoint;
Cout << setprecision(3);
Cout << x << ' ' << y << ' ' << setprecision(2)<< z << endl;
(Multiple Choice)
4.8/5
(39)
Suppose that x and y are int variables,z is a double variable,and 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.8/5
(42)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)