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
Each time a loop body executes is known as an _______________________.
(Short Answer)
4.7/5
(42)
Given the following code fragment and the input value of 4.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
(45)
Executing one or more statements one or more times is known as:
(Multiple Choice)
4.9/5
(37)
In the following code fragment, x has the value of 3.
int x = 3;
(True/False)
4.9/5
(36)
What is the output of the following code fragment?
Int x=0;
While x < 5)
Cout << x << endl;
X ++;
Cout << x << endl;
(Multiple Choice)
4.9/5
(38)
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
(38)
What is the value of x after the following statements?
Int x;
X = x + 30;
(Multiple Choice)
4.8/5
(26)
What is the output of the following code?
Float value;
Value = 33.5;
Cout << "value" << endl;
(Multiple Choice)
4.7/5
(41)
What is the value of x after the following statements?
Double x;
X = 0;
X += 3.0 * 4.0;
X -= 2.0;
(Multiple Choice)
4.9/5
(44)
If x has the value of 3, y has the value of -2, and w is 10, is the following condition true or false?
If x < 2 && w < y)
(Multiple Choice)
4.7/5
(42)
What is the opposite of x < 20 && x > 12)? _______________________
(Short Answer)
5.0/5
(42)
Given the following code fragment, and an input value of 5, what is the output?
Int x;
If x< 3)
{
Cout << "small\n";
}
Else
{
If x < 4)
{
Cout << "medium\n";
}
Else
{
If x < 6)
{
Cout << "large\n";
}
Else
{
Cout << "giant\n";
}
}
}
(Multiple Choice)
4.9/5
(35)
if-else statements that are inside other if-else statements are said to be _______________.
(Short Answer)
4.7/5
(43)
Given the following code fragment, and an input value of 3, what is the output that is generated?
Int x;
Cout <<"Enter a value\n";
Cin >> x;
Ifx=0)
{
Cout << "x is zero\n";
}
Else
{
Cout << "x is not zero\n";
}
(Multiple Choice)
4.8/5
(36)
Showing 41 - 57 of 57
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)