Exam 4: Control Structures I Selection
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C50 Questions
Exam 3: Inputoutput50 Questions
Exam 4: Control Structures I Selection50 Questions
Exam 5: Control Structures II Repetition50 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 Structs50 Questions
Exam 10: Classes and Data Abstraction49 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Searching, Sorting and the Vector Type50 Questions
Exam 17: Linked Lists50 Questions
Exam 18: Stacks and Queues50 Questions
Select questions type
Putting ____________________ in front of a logical expression reverses the value of that logical expression.
Free
(Short Answer)
4.9/5
(33)
Correct Answer:
!
You can disable assert statements by using which of the following?
Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
D
In a ____ control structure, the computer executes particular statements depending on some condition(s).
Free
(Multiple Choice)
5.0/5
(36)
Correct Answer:
C
For a program to use the assert function, it must include which of the following?
(Multiple Choice)
4.8/5
(33)
The value of the expression 7 + 8 <= 15 is ____________________.
(Short Answer)
4.9/5
(31)
Which of the following operators has the highest precedence?
(Multiple Choice)
4.9/5
(37)
When one control statement is located within another, it is said to be ____.
(Multiple Choice)
4.8/5
(37)
To develop a program, you can use an informal mixture of C++ and ordinary language, called ____.
(Multiple Choice)
4.8/5
(38)
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.8/5
(47)
A(n) ____________________ structure does not require the evaluation of a logical expression.
(Short Answer)
4.9/5
(35)
To output results correctly, the switch structure must include a(n) ____________________ statement after each cout statement, except the last cout statement.
(Short Answer)
4.8/5
(46)
What is the output of the following code? char lastInitial = 'A';
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.8/5
(29)
Which of the following is the "not equal to" relational operator?
(Multiple Choice)
4.8/5
(38)
In C++, the logical operator AND is represented by ____________________.
(Short Answer)
4.9/5
(38)
A ____________________ operator allows you to make comparisions in a program.
(Short Answer)
4.8/5
(35)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)