he following program declares à 485afra epresents a student, and each column represents a student's lab grade. For example row 0, which has he values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The ollowing program also prints the array on 4 lines. / program 4 include Int main () float StudentLabs[4] [5]= ((44.5, 0, 100, 66, 77), {55.4, 12.2, 0.5, 99, 70), (88.1, 33.88, 22, 29.55, 59.1), (99, 88, 77, 66, 55}}; int i, j; printf("\t\tGrades\t\t\tlt\tMax\n"); for (i-0; i<4; i++) printf("Studentid\t", i); for (j= 0; j<5; j++) printf (".2r\t", StudentLaba (1) (3]) : printf("\n");
he following program declares à 485afra epresents a student, and each column represents a student's lab grade. For example row 0, which has he values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The ollowing program also prints the array on 4 lines. / program 4 include Int main () float StudentLabs[4] [5]= ((44.5, 0, 100, 66, 77), {55.4, 12.2, 0.5, 99, 70), (88.1, 33.88, 22, 29.55, 59.1), (99, 88, 77, 66, 55}}; int i, j; printf("\t\tGrades\t\t\tlt\tMax\n"); for (i-0; i<4; i++) printf("Studentid\t", i); for (j= 0; j<5; j++) printf (".2r\t", StudentLaba (1) (3]) : printf("\n");
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![The following program declares a 4x5array and initializes its elements upon declaration. Each row
represents a student, and each column represents a student's lab grade. For example row 0, which has
the values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The
following program also prints the array on 4 lines.
// program #4
#include<stdio.h>
int main ()
float StudentLabs [4] (5]- {{44.5, 0, 100, 66, 77),
{55.4, 12.2, 0.5, 99, 70},
(88.1, 33.88, 22, 29.55, 59.1),
(99, 88, 77, 66, 55}};
int i, j;
printf("\t\tGrades\t\t\t\t\tMax\n");
for (i=0; i<4; i++)
printf("Studentid\t", i);
for (j- 0; j<5; j++)
printf("8.2f\t", StudentLabs (i) [j]);
printf("\n"};
return 0:
1. Modify the program so that it calculates the maximum grade for each student (i.e. the maximum
value in each row) and prints the result at the end of each row. The output should look as
follows:
Grades
Мах
Studento
44.50 0.00 100.00 66.00 77.00
100.00
Student1
55.40 12.20 0.50 99.00 70.00
99.00
Student2
88.10 33.88 22.00 29.55 59.10
88.10
Student3
99.00 88.00 77.00 66.00 55.00
99.00](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff91bc278-e0d1-4728-954f-027f1baff633%2F114fd98c-3825-4a3b-afeb-9195d2070d78%2F3ftef8rj_processed.jpeg&w=3840&q=75)
Transcribed Image Text:The following program declares a 4x5array and initializes its elements upon declaration. Each row
represents a student, and each column represents a student's lab grade. For example row 0, which has
the values (44.5, 0, 100, 66, 77), represents five lab grades for the first student. The
following program also prints the array on 4 lines.
// program #4
#include<stdio.h>
int main ()
float StudentLabs [4] (5]- {{44.5, 0, 100, 66, 77),
{55.4, 12.2, 0.5, 99, 70},
(88.1, 33.88, 22, 29.55, 59.1),
(99, 88, 77, 66, 55}};
int i, j;
printf("\t\tGrades\t\t\t\t\tMax\n");
for (i=0; i<4; i++)
printf("Studentid\t", i);
for (j- 0; j<5; j++)
printf("8.2f\t", StudentLabs (i) [j]);
printf("\n"};
return 0:
1. Modify the program so that it calculates the maximum grade for each student (i.e. the maximum
value in each row) and prints the result at the end of each row. The output should look as
follows:
Grades
Мах
Studento
44.50 0.00 100.00 66.00 77.00
100.00
Student1
55.40 12.20 0.50 99.00 70.00
99.00
Student2
88.10 33.88 22.00 29.55 59.10
88.10
Student3
99.00 88.00 77.00 66.00 55.00
99.00
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY