Question: Problem 6.9 In C language, Consider a 5-by-20 integer array grades: a) Write a declaration for grades. b) How many rows does the array have?

Problem 6.9

In C language,

Consider a 5-by-20 integer array grades:

a) Write a declaration for grades.

b) How many rows does the array have?

c) How many columns does the array have?

d) How many elements does the array have?

e) Write the names of all elements in the first column of the array.

f) Write the name of the element in the third row and second column of the array.

g) Write a single statement to assign the value 100 to the element in the first row and second column.

h) Write a nested loop to get all the elements from the keyboard.

i) Write a nested for statement to initialize all elements to zero.

j) Write a statement that copies the values from an array double mathGrades[20] into the elements of the first row of grades.

k) Write a series of statements that determine and print the highest value in the first row of grades.

l) Write a statement to display the element in column 2 of the array.

m) Write a statement to calculate the average of the elements in the first row.

n) Write a series of statements that prints the array grades in a tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.

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!