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
All nested if-else statements can be converted into switch statements.
(True/False)
4.7/5
(42)
What is the output of the following code fragment?
Int x=0;
{
Int x=13;
Cout << x <<",";
}
Cout << x << endl;
(Multiple Choice)
4.8/5
(39)
In an enumerated data type, different constants may not have the same value.
(True/False)
4.8/5
(38)
How many times is "Hi" printed to the screen
Forint i=0;i<14;i++);
Cout <<"Hi\n";
(Multiple Choice)
4.9/5
(44)
What is wrong with the following for loop?
Forint i=0;i<10;i--)
{
Cout << "Hello\n";
}
(Multiple Choice)
4.8/5
(37)
What is the output of the following code fragment?
{
Int x=13;
Cout << x <<",";
}
Cout << x << endl;
(Multiple Choice)
4.8/5
(35)
If you want a loop to quit iterating if x < 10 and y > 3, what would be the proper loop condition test?
(Multiple Choice)
4.9/5
(43)
Given the following enumerated data type definition, what is the value of SAT?
Enum myType{SUN=3,MON=1,TUE=3,WED,THUR,FRI,SAT,NumDays};
(Multiple Choice)
4.9/5
(38)
If you need to write a do-while loop that will ask the user to enter a number between 2 and 5 inclusive, and will keep asking until the user enters a correct number, what is the loop condition?
(Multiple Choice)
4.9/5
(37)
The code following the ________ case is executed if none of the other cases are matched in a switch statement.
(Short Answer)
4.8/5
(30)
A ____________ expression is an expression that can be thought of as being true or false.
(Short Answer)
4.8/5
(38)
Which of the following boolean expressions tests to see if x is between 2 and 15 including 2 and 15)?
(Multiple Choice)
4.9/5
(39)
What is the value of x after the following code executes?
Int x=10;
Ifx++ >10)
{
X =13;
}
(Multiple Choice)
4.9/5
(35)
If a programming language does not use short-circuit evaluation, what is the output of the following code fragment if the value of myInt is 0?
Int other=3, myInt;
IfmyInt !=0 && other % myInt !=0)
Cout << "other is odd\n";
Else
Cout << "other is even\n";
(Multiple Choice)
4.9/5
(39)
Showing 21 - 40 of 45
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)