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

1. A restriction on arrays in C++ is: The assignment operator may not be used to

ID: 3556731 • Letter: 1

Question

1. A restriction on arrays in C++ is:

The assignment operator may not be used to copy one array to another

The size of the array must be specified when the program is written.

All of the above are restrictions on arrays in C++.

C++ does not do range checking on array subscripts

2.

Which of the following statements correctly declares the input file object MyInput and initializes the file object to read the file exam.txt?

MyInput ifstream(exam.txt);

MyInput ifstream("exam.txt");

ifstream MyInput("exam.txt");

ifstream MyInput(exam.txt);

The assignment operator may not be used to copy one array to another

The size of the array must be specified when the program is written.

All of the above are restrictions on arrays in C++.

C++ does not do range checking on array subscripts

2.

  1. Which of the following statements correctly declares the input file object MyInput and initializes the file object to read the file exam.txt?

    MyInput ifstream(exam.txt);

    MyInput ifstream("exam.txt");

    ifstream MyInput("exam.txt");

    ifstream MyInput(exam.txt);

Explanation / Answer

. All of the above are restrictions on arrays in C++.

ifstream MyInput("exam.txt");