Exam 2: C++ Basics
Exam 1: Introduction to Computer and C++ Programming56 Questions
Exam 2: C++ Basics57 Questions
Exam 3: More Flow of Control45 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value53 Questions
Exam 5: Functions for All Sub Tasks54 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes52 Questions
Exam 7: Arrays48 Questions
Exam 8: Strings and Vectors69 Questions
Exam 9: Pointers and Dynamic Arrays39 Questions
Exam 10: Defining Classes61 Questions
Exam 11: Friends, Overloaded Operators, and Arrays in Classes56 Questions
Exam 12: Separate Compilation and Namespaces41 Questions
Exam 13: Pointers and Linked Lists64 Questions
Exam 14: Recursion48 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates35 Questions
Exam 18: Standard Template Library59 Questions
Select questions type
The stream that is used for output to the screen is called ___________.
(Short Answer)
4.9/5
(37)
Loops are used when we need our program to make a choice between two or more things.
(True/False)
4.8/5
(41)
Given the following code fragment and the input value of 2.0, what output is generated?
Float tax;
Float total;
Cout << "enter the cost of the item\n";
Cin >> total;
If total >= 3.0)
{
Tax = 0.10;
Cout << total + total * tax) << endl;
}
Else
{
Cout << total << endl;
}
(Multiple Choice)
4.8/5
(40)
Which of the following lines correctly reads a value from the keyboard and stores it in the variable named myFloat?
(Multiple Choice)
4.9/5
(36)
What is the correct conditional statement to determine if x is between 19 and 99? __________________
(Short Answer)
4.8/5
(40)
What is the value of x after the following statement?
Float x;
X = 3.0 / 4.0 + 3 + 2 / 5
(Multiple Choice)
4.9/5
(33)
What is the output of the following code?
Float value;
Value = 33.5;
Cout << value << endl;
(Multiple Choice)
4.8/5
(42)
What is the value of x after the following statements?
Int x;
X = 15 %4;
(Multiple Choice)
4.9/5
(31)
It is legal to declare more than one variable in a single statement.
(True/False)
4.9/5
(38)
Given the following code fragment, what is the final value of y?
Int x, y;
X = -1;
Y = 0;
Whilex < 3)
{
Y += 2;
X += 1;
}
(Multiple Choice)
4.7/5
(42)
Write the loop condition to continue a while loop as long as x is negative. ____________________
(Short Answer)
4.9/5
(30)
What is the value of x after the following statements?
Float x;
X = 15/4;
(Multiple Choice)
4.7/5
(34)
Showing 21 - 40 of 57
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)