Write a program segment to find a student with the lowest average mark from the array. Display the name of the student with the lowest average mark.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter2: Problem Solving Using C++using
Section2.3: Data Types
Problem 5E
icon
Related questions
Question
Q2
Answer Q2(a)-Q2(c) based on the information given in FIGURE Q2.
/*In
this
is
declared
to
store
students'
program,
Еach
an
array
records.
record
shall
contain
name,
marks
of
first and
second tests,
average marks of the
tests,
and
status
of
the
or "Fail"). Note that this program is
performance (e.g. "Pass"
incomplete.* /
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NUM 5
int main() {
struct Student{
char name[20];
double test1, test2; //marks for first and second tests
double averageTest;
char status[20];
//student's name
//average marks
//performance status
};
typedef struct Student Student;
Student studentArray[MAX_NUM];//array of students' records
FIGURE Q2
Transcribed Image Text:Q2 Answer Q2(a)-Q2(c) based on the information given in FIGURE Q2. /*In this is declared to store students' program, Еach an array records. record shall contain name, marks of first and second tests, average marks of the tests, and status of the or "Fail"). Note that this program is performance (e.g. "Pass" incomplete.* / #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_NUM 5 int main() { struct Student{ char name[20]; double test1, test2; //marks for first and second tests double averageTest; char status[20]; //student's name //average marks //performance status }; typedef struct Student Student; Student studentArray[MAX_NUM];//array of students' records FIGURE Q2
(c)
Write a program segment to find a student with the lowest average mark
from the array. Display the name of the student with the lowest average
mark.
Transcribed Image Text:(c) Write a program segment to find a student with the lowest average mark from the array. Display the name of the student with the lowest average mark.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Array
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr