Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In some cases, instead of declaring multiple instances of a structure with separate names that requires multiple declarations, we prefer to declare them as an

In some cases, instead of declaring multiple instances of a structure with separate names that requires multiple declarations, we prefer to declare them as an array. This is analogous to declaring an array of a standard data-type like an array of integers of size 5 instead of declaring 5 separate integer variables. In this program, you will use an array of structures. Define a structure called Student that has the following members: A character array of size 50 to store the name of the student 2 An array of integers of size 5 to save 5 test scores obtained by the student A double to store the average across the five test scores In your main function: Declare a structure array for 10 students. Prompt the user for the number of students and acquire the values for the name and test scores. Compute the average of the test scores and update the average for each Student. In a separate loop, display the name and average test score for each student using a suitable prompt.

A template of the code is available to write your program

image text in transcribed

Complete the requested changes

#include iostream using namespace std struct Student /Declare members here d: int main //Declare student array for 10 students here int number; cout>number; for (int i-0;i

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions