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

Instructions: Choose letter that preceds the world or phrase that best answers t

ID: 3552979 • Letter: I

Question

Instructions: Choose letter that preceds the world or phrase that best answers the question or completes the sentence.


1. In the code inFile.open("results",ios::in);A) ios::in is the stream operation mode.

B) inFile is the header file reference.

C) ios::in is the stream variable name

D) inFile is the name of the file.

E) "results" is an array in which the data is stored.


2. Which of the following is NOT true about arrays in C++?

A) Their elements are homogenous (of the same type).

B) They must be stored in a contiguous segment of memory0.

C) C++ does bounds checking on arrays

D) They cannot be resiced after they are created.

E) They may be delcared without an explicit size descriptor.


3. The last valid index in an array that has n elements is

A) n -1

B) n

C) n+1

D) 2n-1

E) n^2


4. In the statments double grades[150; 150 is ____

A) an array index

B) an element of the array

C) an array size descriptor

D) the minimum number of elements that the array may contain

E) the first element of the array


5. The statement double x = sqrt(number); contains a

A) function call.

B) fuction header

C) formal parameter

D) parameterless fuction

E) fuction prototype.


6. A fuction that returns exactly one value is a ___ function.

A) unary

B) mathematical

C) value-returning

D) void

E) parameterized

Explanation / Answer

1)inFile is the header file reference.

2)C++ does bounds checking on arrays

3) n -1

4)an array size descriptor

5) function call

6) unary