Exam 4: Control Structures I (Selection)
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the string Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
Assume you have three int variables: x = 2,y = 6,and z.Choose the value of z in the following expression: z = (y / x > 0)? x : y;.
(Multiple Choice)
4.9/5
(35)
The value of the expression 6 < 5 || 'g' > 'a' && 7 < 4
is ____________________.
(True/False)
4.9/5
(26)
The result of a logical expression cannot be assigned to an int variable,but it can be assigned to a bool variable.
(True/False)
4.7/5
(37)
Suppose found = true and num = 6.The value of the expression (!found)|| (num > 6)is ____________________.
(True/False)
4.8/5
(31)
What is the output of the following C++ code? int x = 55;
Int y = 5;
Switch (x % 7)
{
Case 0:
Case 1:
Y++;
Case 2:
Case 3:
Y = y + 2;
Case 4:
Break;
Case 5:
Case 6:
Y = y - 3;
}
Cout << y << endl;
(Multiple Choice)
4.7/5
(42)
Which of the following operators has the lowest precedence?
(Multiple Choice)
4.9/5
(34)
You can disable assert statements by using which of the following?
(Multiple Choice)
4.9/5
(44)
Putting ____________________ in front of a logical expression reverses the value of that logical expression.
(Short Answer)
4.8/5
(37)
The term ____________________ describes a process in which the computer evaluates a logical expression from left to right and stops as soon as the value of the expression is known.
(Short Answer)
4.8/5
(30)
Which of the following expressions correctly determines that x is greater than 10 and less than 20?
(Multiple Choice)
4.8/5
(40)
Suppose P and Q are logical expressions.The logical expression P && Q is true if both P and Q are true.
(True/False)
4.9/5
(41)
What is the output of the following code?
char lastInitial = 'S';
Switch (lastInitial)
{
Case 'A':
Cout << "section 1" << endl;
Break;
Case 'B':
Cout << "section 2" << endl;
Break;
Case 'C':
Cout << "section 3" << endl;
Break;
Case 'D':
Cout << "section 4" << endl;
Break;
Default:
Cout << "section 5" << endl;
}
(Multiple Choice)
4.7/5
(36)
The expression in an if statement is sometimes called a(n)____.
(Multiple Choice)
4.8/5
(32)
To develop a program,you can use an informal mixture of C++ and ordinary language,called ____.
(Multiple Choice)
4.8/5
(41)
A ____________________ operator allows you to make comparisions in a program.
(Short Answer)
4.8/5
(32)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)