Question: Write a C program that does the following: 1. Create a function named numberOfPassed that receives the following: a. A 2D array with column size
Write a C program that does the following:
1. Create a function named numberOfPassed that receives the following: a. A 2D array with column size equals 5; each row of this array contains the grades of C lab for a particular section. b. Number of rows of the 2D array. c. A 1D-integer array named passed_students with a size equivalent to the number of rows of the 2D array. The function does the following: It computes the number of passed students in each section and saves the result in the corresponding index in the passed_students array. In addition, it returns the total number of passed students in all sections. 2. In the main function: a. Create a 2D-integer array of size 4 x 5 that represents the grades of 4 sections in the C lab course. Each section consists of 5 students. b. Ask the user to fill the array. c. Create a 1D-integer array of size 4. d. Call the numberOfPassed function and pass the 2D array, its number of rows, and the 1D array. e. Print the total number of passed students in all sections. f. Print the content of the 1D array as follows: Section# number of passed students
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
