Question: Question 3 (10 marks) as shown in Figure 2 which contain marks and name u Given the input file data.txt as shown in Figure 2

 Question 3 (10 marks) as shown in Figure 2 which contain

Question 3 (10 marks) as shown in Figure 2 which contain marks and name u Given the input file "data.txt" as shown in Figure 2 students. All the following questions, (a) to (e) are relate 45.0 Ahmad 75.5 John 55.0 Salma Figure 2: file data.txt Ahmad 45.0 John 75.5 Salma 55.0 Figure 3: file result.out [1 m) file variable. write C statements to declare pointer fin as an input file variable and fout as an output [1 m] D) Write C statement to open the existing file "data.txt" for reading and writing. [1 m) c) Write C statement to open output file "result.out" for appending. d) Write C statements to read all the data from file "data.txt", store to the variable name and mark and then, display all the data in the output file result.out as shown in Figure 3. [3 m] e) What is the content of the file "result.out" after the execution of the program segment [4 m) 3.12 1/program segment 3.1 for (int i=1; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!