Question: Please complete the c++ code. The code that needs completing is outlined in the comments. #include #include #include struct student{ int id; int score;}; struct

Please complete the c++ code. The code that needs completing is outlined in the comments.

#include

#include

#include

struct student{

int id; int score;};

struct student* allocate(){

/*Allocate memory for ten students*/

/*return the pointer*/

}

void generate(struct student* students){

/*Generate random and unique ID and scores for ten students, ID being between 1 and 10, scores between 0 and 100*/

}

void output(struct student* students){

/*Output information about the ten students in the format: ID1 Score1 ID2 score2 ID3 score3 ... ID10 score10*/

}

void summary(struct student* students){

/*Compute and print the minimum, maximum and average scores of the ten students*/

}

void deallocate(struct student* stud){

/*Deallocate memory from stud*/

}

int main(){

struct student* stud = NULL;

/*call allocate*/

/*call generate*/

/*call output*/

/*call summary*/

/*call deallocate*/

return 0;

}

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!