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

Guidelines: C for System Programming AME TCSS-333 Mid-Term Exam You are allowed

ID: 3881981 • Letter: G

Question

Guidelines: C for System Programming AME TCSS-333 Mid-Term Exam You are allowed to use your text book (hard copy ON electronic devices are allowed. and nlytwo pages of hand wit 1. (5 pts.) Fill in the code segment below with ALL necessary statements to open a phin tent lsine reading (be careful... note the word ALL): void main (void) f fclose 2. (20 pts.) Assuming you completed #1 above correctly and the file named inputut contains write a function that receives a pointer to the file opened from #1 above, a 3x4-2 integers representing the number of rows and cols of the 2D array, respectively and values in input1.txt. 20 30 40 5 10 15 20 1 2 3 4 10

Explanation / Answer

}

create a variable c to read the data from the file input.txt .

create a pointer variable file to open and read the contents of file .

Read the data one by one and then close the file