Exam 3: More Flow of Control
Exam 1: Introduction to Computer and C Programming55 Questions
Exam 2: C++ Basics54 Questions
Exam 3: More Flow of Control44 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value51 Questions
Exam 5: Functions for All Sub Tasks53 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes51 Questions
Exam 7: Arrays34 Questions
Exam 8: Strings and Vectors63 Questions
Exam 9: Pointers and Dynamic Arrays40 Questions
Exam 10: Defining Classes50 Questions
Exam 11: Friends, overloaded Operators, and Arrays in Classes49 Questions
Exam 12: Separate Compilation and Namespaces38 Questions
Exam 13: Pointers and Linked Lists51 Questions
Exam 14: Recursion43 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates33 Questions
Exam 18: Standard Template Library57 Questions
Select questions type
Which of the following boolean expressions tests to see if x is between 2 and 15 including 2 and 15)?
Free
(Multiple Choice)
4.8/5
(29)
Correct Answer:
C
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};
Free
(Multiple Choice)
4.8/5
(41)
Correct Answer:
A
Which of the following is not a good reason for choosing a certain loop control?
Free
(Multiple Choice)
4.9/5
(33)
Correct Answer:
D
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.8/5
(47)
How many times is "Hi" printed to the screen
Forint i=0;i<14;i++);
Cout <<"Hi\n";
(Multiple Choice)
4.8/5
(47)
A ____________ expression is an expression that can be thought of as being true or false.
(Short Answer)
4.8/5
(39)
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.8/5
(36)
A _________ loop always executes the loop body at least once,irregardless of the loop condition.
(Short Answer)
4.7/5
(37)
Given the following code,what is the final value of i?
Int i;
Fori=0; i<=4;i++)
{
Cout << i << endl;
}
(Multiple Choice)
4.9/5
(35)
Given the following code,what is the final value of i?
Int i,j;
Fori=0;i<4;i++)
{
Forj=0;j<3;j++)
{
Ifi==2)
Break;
}
}
(Multiple Choice)
4.9/5
(34)
What is the output of the following code fragment?
Int x=0;
{
Int x=13;
Cout << x <<",";
}
Cout << x << endl;
(Multiple Choice)
4.9/5
(31)
Which boolean operation is described by the following table?


(Multiple Choice)
4.9/5
(33)
What is wrong with the following for loop?
Forint i=0;i<10;i--)
{
Cout << "Hello\n";
}
(Multiple Choice)
4.9/5
(34)
Showing 1 - 20 of 44
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)