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
Suppose found = true and num = 6. The value of the expression (!found) || (num > 6) is ____________________.
(Short Answer)
4.8/5
(31)
The expression (x >= 0 && x <= 100) evaluates to false if either x < 0 or x >= 100.
(True/False)
4.8/5
(37)
What is the output of the following code?
if (6 > 8)
{
cout << " ** " << endl ;
cout << "****" << endl;
}
else if (9 == 4)
cout << "***" << endl;
else
cout << "*" << endl;
(Multiple Choice)
4.9/5
(43)
What is the output of the following code fragment if the input value is 4? int num;
Int alpha = 10;
cin >> num;
switch (num)
{
case 3:
alpha++;
break;
case 4:
case 6:
alpha = alpha + 3;
case 8:
alpha = alpha + 4;
break;
default:
alpha = alpha + 5;
}
cout << alpha << endl;
(Multiple Choice)
4.7/5
(41)
Putting a semicolon after the parentheses following the expression in an if statement (that is, before the statement) is a(n) ____________________ error.
(Short Answer)
4.7/5
(37)
Which of the following operators has the lowest precedence?
(Multiple Choice)
4.7/5
(30)
What is the output of the following C++ code? int x = 35;
int y = 45;
int z;
if (x > y)
z = x + y;
else
z = y - x;
cout << x << " " << y << " " << z << endl;
(Multiple Choice)
4.7/5
(37)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)