Exam 3: Expressions and Interactivity
Exam 1: Introduction to Computers and Programming47 Questions
Exam 2: Introduction to C62 Questions
Exam 3: Expressions and Interactivity45 Questions
Exam 4: Making Decisions51 Questions
Exam 5: Loops and Files60 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays and Vectors56 Questions
Exam 8: Searching and Sorting Arrays30 Questions
Exam 9: Pointers47 Questions
Exam 10: Characters, C-Strings, and More About the String Class47 Questions
Exam 11: Structured Data46 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes54 Questions
Exam 14: More About Classes46 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions43 Questions
Exam 16: Exceptions and Templates36 Questions
Exam 17: The Standard Template Library38 Questions
Exam 18: Linked Lists41 Questions
Exam 19: Stacks and Queues47 Questions
Exam 20: Recursion27 Questions
Exam 21: Binary Trees39 Questions
Select questions type
This manipulator forces cout to print digits in fixed-point notation:
(Multiple Choice)
4.9/5
(30)
__________ reads a line of input, including leading and embedded spaces, and stores it in a string object.
(Multiple Choice)
4.8/5
(38)
The fixed manipulator causes a number to be displayed in scientific notation.
(True/False)
4.7/5
(29)
When a program uses the setw manipulator, the iosetwidth header file must be included in a preprocessor directive.
(True/False)
4.9/5
(33)
Which of the following must be included in any program that uses the cin object?
(Multiple Choice)
4.7/5
(39)
A debugging process where you, the programmer, pretend you are a computer and step through each statement while recording the value of each variable at each step is known as
(Multiple Choice)
4.8/5
(35)
What is the value of x after the following code executes?
Int x = 0;
Int y = 5;
Int z = 4;
X = x + y + z * 2;
(Multiple Choice)
4.9/5
(29)
If you want to know the length of the string that is stored in a string object, you can call the object's size member function.
(True/False)
4.8/5
(29)
What will be displayed after the following statements execute?
int num1 = 5;
int num2 = 3;
cout << "The result is " << (num1 * num2 + 10) << endl;
(Multiple Choice)
4.9/5
(36)
Which of the following statements will pause the screen until the [Enter] key is pressed?
(Multiple Choice)
4.8/5
(29)
When C++ is working with an operator, it strives to convert the operands to the same type.
(True/False)
4.8/5
(34)
Which of the following will allow the user to input the values 15 and 20 and have them stored in variables named base and height, respectively?
(Multiple Choice)
4.9/5
(35)
Which of the following functions will return the value of x, rounded to the nearest whole number?
(Multiple Choice)
4.9/5
(37)
The cin << statement will stop reading input when it encounters a newline character.
(True/False)
4.8/5
(35)
How many characters will the following statement read into the variable myString?
Cin >> setw(10) >> myString;
(Multiple Choice)
4.9/5
(31)
In the following statement, what will be executed first according to the order of precedence?
Result = 6 - 3 * 2 + 7 - 10 / 2;
(Multiple Choice)
4.8/5
(28)
The following statement will output $5.00 to the screen:
cout << setprecision(5) << dollars << endl;
(True/False)
4.8/5
(31)
To use the rand()function, you must include the __________ header file?
(Multiple Choice)
4.9/5
(28)
Which line in the following program will cause a compiler error?
1 #include <iostream>
2 using namespace std;
3
4 int main()
5 {
6 const int MY_VAL = 77;
7 MY_VAL = 99;
8 cout << MY_VAL << endl;
9 return 0;
10 }
(Multiple Choice)
5.0/5
(42)
The __________ operator always follows the cin object, and the __________ operator follows the cout object.
(Multiple Choice)
4.8/5
(29)
Showing 21 - 40 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)