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
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;
}
Free
(Multiple Choice)
4.7/5
(32)
Correct Answer:
B
What is the value of x after the following statements?
Int x;
X = 15/4;
Free
(Multiple Choice)
4.8/5
(45)
Correct Answer:
B
Which of the following is a valid identifier?
Free
(Multiple Choice)
4.7/5
(36)
Correct Answer:
C
Given the following code fragment, which of the following expressions is always true?
Int x;
Cin >> x;
(Multiple Choice)
4.8/5
(38)
What is the value of x after the following statements?
Int x;
X = 0;
X = x + 30;
(Multiple Choice)
4.8/5
(43)
What is the final value of x after the following fragment of code executes?
Int x=0;
Do
{
X++;
}whilex > 0);
(Multiple Choice)
4.9/5
(34)
The stream that is used for input from the keyboard is called ___________.
(Short Answer)
4.9/5
(39)
What is the output of the following code?
Cout << "This is a \\" << endl;
(Multiple Choice)
4.9/5
(44)
A loop that always executes the loop body at least once is known as a _____________ loop.
(Short Answer)
4.8/5
(34)
In a compound logical and &&) expression, the evaluation of the expression stops once one of the terms of the expression is false. This is known as ______________ evaluation.
(Short Answer)
4.9/5
(44)
What is the value of x after the following statements?
Int x, y, z;
Y = 10;
Z = 3;
X = y * z + 3;
(Multiple Choice)
4.8/5
(38)
Given the following code fragment, what is the output?
Int x=5;
If x > 5)
Cout << "x is bigger than 5. ";
Cout <<"That is all. ";
Cout << "Goodbye\n";
(Multiple Choice)
4.9/5
(38)
The _______ keyword in C++11 determines the type of a variable based on the data type that the variable is set to.
(Short Answer)
4.7/5
(42)
What is the advantage of the C++11 integer data types over the old data types?
(Multiple Choice)
4.8/5
(39)
When must we use braces to define the body of a contitional expression? ______________
(Essay)
4.9/5
(39)
Showing 1 - 20 of 57
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)