Question: SECTION C: PROGRAMMING QUESTI (30 MARKS) ANSWER TWo (2) QUESTIONS IN THE SPACE PRO (15 Marks subject Question 1 Write a C students from a

 SECTION C: PROGRAMMING QUESTI (30 MARKS) ANSWER TWo (2) QUESTIONS IN

THE SPACE PRO (15 Marks subject Question 1 Write a C students

from a file into an array. The a) The average mark for

SECTION C: PROGRAMMING QUESTI (30 MARKS) ANSWER TWo (2) QUESTIONS IN THE SPACE PRO (15 Marks subject Question 1 Write a C students from a file into an array. The a) The average mark for Science and Mathematics subject. b) Th of 100 program that will read Gender, marks for Science and Mathematics program will find: mark for Science and e number of male and female students who score above average Mathematics subject The program consists of three functions. The function prototypes and global varnab given below: void getMark //read data from file void calAva/eaiculate the average mark for science and Math void displaylint, int) //dispiay the average mark and numbez of students char gender [N float science [N], math (N, avgScience, avaath Read 100 students' data from the input file named mark2014.txt" into array genderN science (N], math(N) . This input file is shown in Figure C(1) 80.4 79.6 82.0 65.0 82.2 72.B 83.0 64.6 78.2 81.0 Figure C(I): Input file "mark2014.txt" The output of this program should be displayed on the screen. The snapshot of the screen output is shown in Figure C(2) The average mark (Science) 78.30 The average mark (Mathematic): 80.20 The number of students who score above both average marks MALE : 43 FEMALE 38 Figure C(2): Screen output

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!