Exam 3: More Flow of Control
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
What is the value of the following expression?
True && 4/3 || !6)))
Free
(Multiple Choice)
4.7/5
(29)
Correct Answer:
A
if x is 0, what is the value of !x ==0)?
Free
(Multiple Choice)
4.7/5
(39)
Correct Answer:
A
Given the following code, what is the final value of i?
Int i;
Fori=0; i<=4;i++)
{
Cout << i << endl;
}
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
C
What is the value of x after the following code executes?
Int x=10;
If ++x >10)
{
X =13;
}
(Multiple Choice)
4.9/5
(35)
A loop that iterates one too many or one too few times is said to be ________
(Short Answer)
4.9/5
(39)
A _________ loop always executes the loop body at least once, irregardless of the loop condition.
(Short Answer)
4.7/5
(32)
What is NOT an advantage of an enum class over a standard enum?
(Multiple Choice)
4.7/5
(41)
Which boolean operation is described by the following table?


(Multiple Choice)
4.8/5
(33)
Variables defined inside a set of braces are said to be _______ to that block of code.
(Short Answer)
4.9/5
(46)
Given the following enumerated data type definition, what is the value of SAT?
Enum myType{SUN,MON,TUE,WED,THUR,FRI,SAT,NumDays};
(Multiple Choice)
4.9/5
(34)
What is wrong with the following switch statement?
Int ans;
Cout <<"Type y for yes on n for no\n";
Cin >> ans;
Switch ans)
{
Case 'y':
Case 'Y': cout << "You said yes\n"; break;
Case 'n':
Case 'N': cout << "You said no\n"; break;
Default: cout <<"invalid answer\n";
}
(Multiple Choice)
4.7/5
(42)
Which boolean operation is described by the following table?


(Multiple Choice)
4.9/5
(36)
What is the output of the following code fragment if x is 15?
Ifx < 20)
Ifx <10)
Cout << "less than 10 ";
Else
Cout << "large\n";
(Multiple Choice)
4.9/5
(29)
_________ is a type whose values are defined by a list of constants of type int.
(Short Answer)
4.7/5
(31)
Which of the following is not a good reason for choosing a certain loop control?
(Multiple Choice)
4.9/5
(37)
Which of the following are valid case statements in a switch?
(Multiple Choice)
4.8/5
(41)
Showing 1 - 20 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)