Exam 5: Control Structures II (Repetition)
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
Suppose j,sum,and num are int variables,and the input is 26 34 61 4 -1.What is the output of the code?
sum = 0;
Cin >> num;
For (int j = 1; j <= 4; j++)
{
Sum = sum + num;
Cin >> num;
}
Cout << sum << endl;
(Multiple Choice)
4.8/5
(38)
What is the value of x after the following statements execute? int x = 5;
Int y = 30;
Do
X = x * 2;
While (x < y);
(Multiple Choice)
5.0/5
(36)
A(n)____-controlled while loop uses a bool variable to control the loop.
(Multiple Choice)
4.7/5
(37)
What is the next Fibonacci number in the following sequence? 1,1,2,3,5,8,13,21,...
(Multiple Choice)
4.8/5
(39)
The number of iterations of a counter-controlled loop is known in advance.
(True/False)
4.9/5
(43)
Suppose sum,num,and j are int variables,and the input is 4 7 12 9 -1.What is the output of the following code?
cin >> sum;
Cin >> num;
For (j = 1; j <= 3; j++)
{
Cin >> num;
Sum = sum + num;
}
Cout << sum << endl;
(Multiple Choice)
4.8/5
(32)
What is the output of the following C++ code? int j;
For (j = 10; j <= 10; j++)
Cout << j << " ";
Cout << j << endl;
(Multiple Choice)
4.8/5
(28)
A loop ____________________ is a set of statements that remains true each time the loop body is executed.
(Short Answer)
4.7/5
(36)
The function eof is a member of the data type ____________________.
(Short Answer)
4.9/5
(40)
Which of the following loops is guaranteed to execute at least once?
(Multiple Choice)
4.8/5
(43)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)