Question: Question 1 True/False: The following statement initializes all five elements of the number array to 1. int number[5] = {1}; True False QUESTION 2 Unlike
Question 1
True/False: The following statement initializes all five elements of the number array to 1.
int number[5] = {1};
True
False
QUESTION 2
Unlike regular variables, arrays can hold multiple ________.
| variables | ||
| data types | ||
| named constants | ||
| operators | ||
| values |
QUESTION 3
True/False: The following statement adds a new element to a the department vector at index 25. department.push_back(25);
True
False
QUESTION 4
When an array is passed to a function, it is actually ________ the array that is/are passed.
| the value stored in the first element of | ||
| the starting memory address of | ||
| the data type and name of | ||
| the data type and size of | ||
| a copy of all the values in |
QUESTION 5
To step through a one-dimensional array, accessing the elements one by one, it would be most appropriate to use ________ loop.
| a for loop | ||
| a sentinel controlled loop | ||
| no | ||
| an infinite | ||
| a nested loop |
QUESTION 6
The statement int grades[ ] = { 100, 90, 99, 80 }; is an example of ________.
| an illegal array initialization | ||
| data encapsulation | ||
| implicit array sizing | ||
| default arguments | ||
| an illegal array declaration |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
