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
When you pass an array as a parameter,the base address of the actual array is passed to the formal parameter.
(True/False)
4.8/5
(41)
Consider the following declaration: int alpha[5] = {3,5,7,9,11};.Which of the following is equivalent to this statement?
(Multiple Choice)
4.9/5
(36)
The ____________________ sort algorithm finds the location of the smallest element in the unsorted portion of the list and moves it to the top of the unsorted portion of the list.
(Short Answer)
4.9/5
(45)
Suppose that sales is an array of 50 components of type double.Which of the following correctly initializes the array sales?
(Multiple Choice)
4.9/5
(34)
What is the output of the following C++ code? int alpha[5] = {2,4,6,8,10};
int j;
for (j = 4; j >= 0; j--)
cout << alpha[j] << " ";
cout << endl;
(Multiple Choice)
4.8/5
(42)
The function ____________________ returns the length of the string s,excluding the null character.
(Short Answer)
4.8/5
(41)
The ____________________ of an array is the address (that is,the memory location)of the first array component.
(Short Answer)
4.9/5
(42)
Consider the following declaration: char str[15];.Which of the following statements stores "Blue Sky" into str?
(Multiple Choice)
4.9/5
(37)
Given the declaration int list[20]; the statement list[12] = list[5] + list[7]; updates the content of the twelfth component of the array list.
(True/False)
4.8/5
(42)
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 fifth row of sale?
(Multiple Choice)
4.8/5
(30)
Suppose that gamma is an array of 50 components of type int and j is an int variable.Which of the following for loops sets the index of gamma out of bounds?
(Multiple Choice)
4.8/5
(30)
The one place where C++ allows aggregate operations on arrays is the input and output of C-strings.
(True/False)
4.9/5
(31)
The word ____________________ is used before the array declaration in a function heading to prevent the function from modifying the array.
(Short Answer)
5.0/5
(40)
The following statements store the value ____________________ into len.
int len;
len = strlen("Sunny California");
(Short Answer)
4.8/5
(29)
In a(n)____________________ data type,each data item is a collection of other data items.
(Short Answer)
4.9/5
(37)
Consider the following declaration:
char charArray[51];
Char discard;
Assume that the input is:
Hello There!
How are you?
What is the value of discard after the following statements execute?
cin.get(charArray,51);
cin.get(discard);
(Multiple Choice)
5.0/5
(41)
The following statement creates alpha to be a two-dimensional array with ____________________ rows.
int alpha[10][25];
(Short Answer)
4.8/5
(42)
Two (or more)arrays are called ____________________ if their corresponding components hold related information.
(Short Answer)
4.9/5
(41)
In the following declaration,the array gamma has ____________________ components.
int gamma[5][6][10];
(Short Answer)
4.9/5
(33)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)