mat. 3. Create a function called StdGPA that a 2D array (StdA), its size, and an integer value (indexSt) and does the following: a. Check if size and indexSt are in a proper range. If not Print a message for the user. b. Compute and return the average grades the student indexSt. 4. Create a function called MaxGPA that that a 2D array (StdA) and its rows and cols (row and col) and does the following: a. Check if row and col are in a proper range. If not pri

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Topic Video
Question

Develop a C program that does the following:
1. Define the global symbolic constants ROWS with value 3 and COLS with value 4.
2. Create a function named PrintArray that receives a 2D array (StdA) and its rows and cols (row and
col) and does the following:
a. Check if row and col are in a proper range. If not Print a message for the user.
b. Print StdA in a tabular format.
3. Create a function called StdGPA that a 2D array (StdA), its size, and an integer value (indexSt) and
does the following:
a. Check if size and indexSt are in a proper range. If not Print a message for the user.
b. Compute and return the average grades the student indexSt.
4. Create a function called MaxGPA that that a 2D array (StdA) and its rows and cols (row and col)
and does the following:
a. Check if row and col are in a proper range. If not print a message for the user and return
-1.
b. Declare a 1D array called StudentGPA of size row.
c. Call StdGPA for each student in StdA to fill StudentGPA.
d. Find the maximum GPA in StudentGPA.
e. Return the index of student that has the maximum GPA.
5. Create a function called ValidateValue that receives a float value (grade) and returns 1 if grade is
greater than or equal 35 and less than or equal 100. Otherwise, it returns 0.
6. In the main function:
a. Declare a 2D float array of size ROWS x COLS called Students.
b. Fill Students with their grades in 4 courses from the user. Ensure that all values in
Students are between 35 and 100 using ValidateValue function.
c. Call PrintArray and pass Students and its size (rows and cols).
d. Call MaxGPA and pass Students and its size (rows and cols) to find the student (indexStd)
that has the maximum GPA.
e. Compute and print the GPA of the student (indexStd) using StudentGPA function.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education