Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In C++ array indices, that is subscript values, must be a) A real type b) Less t

ID: 3848817 • Letter: I

Question

In C++ array indices, that is subscript values, must be a) A real type b) Less than or equal to the declared size of the array c) Non-negative d) None of these is correct The declaration statement for a function is referred to as function _________? a) calling b) Prototype c) definition d) initialization Given the array declaration, int a[20]: The first element is written as: a) a[0] b) a[1] c) a d) a[20] The header file that you must #include to have access to the Standard Library string class is a) C-string b) string.h c) string d) String.h Given the array declaration, int a[20]: The last (legal) element is written as: a) a[0] b) a c) a[19] d) a[20] The ________ fstream member function closes a file stream. a) close() b) overloaded operator

Explanation / Answer

1-b) Less than or egual to declaration size of array

2-c

3-a) a[0] is the initial index

4-b) string.h is the string header file

5-c) a[19] is theposition for last element

6-a close()

7-a) nested loops are used to deal with 2d array

8-a) int x[4] = {8, 7, 6, 5, 4} is incorrect declaration as the array size is 4 and elements are 5