C++ Arrays True or False? a. All elements of an array are of the same type. (tru
ID: 3642265 • Letter: C
Question
C++ ArraysTrue or False?
a. All elements of an array are of the same type. (true/false)
b. Arrays cannot contain strings as elements. (true/false)
c. Two-dimensional arrays always have the same number of rows and columns. (true/false)
d. Elements of different columns in a two-dimensional array can have different types. (true/false)
e. A function cannot return a two-dimensional array. (true/false)
f. All array parameters are reference parameters. (true/false)
g. A function cannot change the dimensions of a two-dimensional array that is passed as a parameter. (true/False)
Explanation / Answer
a) True (all elements of an array must be of same type like integer or double or float etc) b) False (array can store strings as elements) c)False (can have diff number of rows and columns) d)False (type must be same) e) False f)True(Arrays are always passed by reference since the array name can be regarded as a pointer) g)true
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.