Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Course 3 Course 4 pass pass pass fail Exercise 2 - Connect four 2D array Exercise Objectives Passing 2-D arrays to functions Call by reference

image text in transcribed

Course 3 Course 4 pass pass pass fail Exercise 2 - Connect four 2D array Exercise Objectives Passing 2-D arrays to functions Call by reference Numbers of courses in First Term: 80 45 60 55 Problem Description Write and run a C program with the following functions Creates a int 4 x 2 two-dimensional array named Grades (which represents the grades of courses registered in two terms) Define and implement function that receives an array as parameter. The function should fills the array with the grades entered by the user, for each term as shown in the sample below. Define and implement a function that swap the grades of course 1 with the grades of course 4, and reprints the Grades array after the above modifications. Define and implement function that check for each grade in the table(Before swapping), if the grade is greater than or equal to 50 then print pass, otherwise print fail. Define and implement a function that creates a float 1-D array of 4 elements, Fills the array by the elements of the first column of Grades array and print it. Sample Output Please, input grades of courses registered in Two Terms: 55 70 45 77 60 65 80 40 Grades Before Swapping: Course# First Term Course 1 55 Course 2 45 Course 3 60 Course 4 80 Second Term 70 77 65 40 Grades After Swapping: Course# First Term Course 1 80 Course 2 45 Course 3 60 55 Second Term 40 77 65 70 Course 4 Second Term (Pass/Fail ) Table: Course# First Term Course 1 pass Course 2 fail pass pass

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

Design a job advertisement.

Answered: 1 week ago