234k views
0 votes
102. An array with no elements is a. legal in C++ b. illegal in C++ c. automatically furnished with one element whose value is set to zero d. automatically furnished with one element, the null terminator e. None of these 103 To assign the contents of one array to another, you must use a. the assignment operator with the array names b. the equality operator with the array names c. a loop to assign the elements of one array to the other array d. Any of these e. None of these 104. When writing functions that accept multi-dimensional arrays as arguments, must be explicitly stated in the parameter list. a. all dimensions b. all but the first dimension c. the size declarator of the first dimension d. all element values e. None of these data type(s). 105. A two dimensional array can have elements of a. one b. two c. four d. any number of e. None of these

User Real World
by
8.3k points

1 Answer

3 votes

102. An array with no elements is legal in C++. This is because C++ allows for the declaration of empty arrays. However, an empty array will have a size of zero and cannot store any elements.

103.
To assign the contents of one array to another, you can use either the assignment operator with the array names or a loop to assign the elements of one array to the other array. Both methods are valid and can be used interchangeably.

104. When writing functions that accept multi-dimensional arrays as arguments, you need to explicitly state all dimensions in the parameter list. This means that you need to include the size declarators for each dimension of the array in the function's parameter list.

105.
A two-dimensional array can have any number of elements. The number of elements in a two-dimensional array is determined by the size of its rows and columns. For example, a 2x3 array would have a total of 6 elements, while a 3x3 array would have a total of 9 elements. The number of elements in a two-dimensional array can vary depending on the size of the array.

User Vilson
by
8.3k points