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

1) name the type of file where data must be accessed in the order of storage ...

ID: 3569223 • Letter: 1

Question

1) name the type of file where data must be accessed in the order of storage...

2) what is the C++ fstream member function that is used to disconnect a file from a program?

3) by default what will happen to an existing sequential file that is opened for input?

4) using the open function, write statements to declare and open a file stream named outstream as a connection to an output file named outfile.txt

5) using the close member function, write the statement that is necessary to disconnect the opened ofstream named outstream from your program (ofstream outStream;)

6) declare an array of type int of length 9 with a name of Iarray

7) given the following array declaration, how would you refer to the first element in the array? double b[4];

8) given the following array declaration, how would you refer to the last element in the array? double b[4];

9) for the following array declaration, write an appropiate for statement that would set all of the array's values equal to 45. No comments or subprograms are necessary. int b[74];

Explanation / Answer

1)binary file;

2)close();

3)

4)outstream.open("outfile.txt");

5)outStream.close();

6)int larray[9];

7)b[0];

8)b[3];

9)for(int i=0; i< 74 ;i++){
b[i] = 45;
}