Exam 8: Arrays and Strings
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 list is a one dimensional array of size 25,wherein each component is of type int.Further,suppose that sum is an int variable.The following for loop correctly finds the sum of the elements of list.
sum = 0;
for (int i = 0; i < 25; i++)
sum = sum + list;
(True/False)
4.8/5
(40)
Which of the following statements declares alpha to be an array of 25 components of the type int?
(Multiple Choice)
4.8/5
(46)
A collection of a fixed number of elements (called components)arranged in n dimensions (n>=1)is called a(n)____.
(Multiple Choice)
4.8/5
(40)
Given the following declaration: int j;
int sum;
double sale[10][7];
Which of the following correctly finds the sum of the elements of the fourth column of sale?
(Multiple Choice)
4.7/5
(34)
Complete the following statement so that it outputs the array sales.
double sales[10];
int index;
for (index = 0; index < 10; index++)
cout << ____________________ << " ";
(Short Answer)
4.8/5
(38)
In a two-dimensional array,the elements are arranged in a table form.
(True/False)
4.9/5
(40)
After the following statements execute,what are the contents of matrix?
int matrix[3][2];
Int j,k;
For (j = 0; j < 3; j++)
For (k = 0; k < 2; k++)
Matrix[j][k] = j + k;
(Multiple Choice)
4.9/5
(36)
The header file string contains the function ____________________,which converts a value of type string to a null-terminated character array.
(Short Answer)
4.7/5
(39)
Arrays can be passed as parameters to a function by value,but it is faster to pass them by reference.
(True/False)
4.9/5
(31)
Assume you have the following declaration char nameList[100];.Which of the following ranges is valid for the index of the array nameList?
(Multiple Choice)
4.8/5
(35)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)