1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Minchanka [31]
3 years ago
15

class student_record { public: int age; string name; double gpa; }; Implement a void function that has five formal parameters: a

dynamic array of student_records, the count (number of student_records in the array), an integer, a string, and a double. The function will delete a student record in the dynamic array with age, name and gpa fields that match the age, name and gpa fields that are given in the formal parameters. Remember, to check to see if the dynamic array is empty because you cannot delete from an empty array.
Computers and Technology
1 answer:
Setler79 [48]3 years ago
8 0

Answer:

void delete_record(student_record *arr, int &size, int age, string name, double gpa) {

int index = -1;

if (arr != NULL && size > 0) {

for (int i = 0; i < size; ++i) {

if (arr[i].age == age && arr[i].name == name && arr[i].gpa == gpa) {

index = i;

break;

}

}

}

if (index != -1) {

for (int i = index; i < size - 1; ++i) {

arr[i] = arr[i + 1];

}

size--;

}

}

You might be interested in
Who was the inventor of the iPhone?
Over [174]

Steve Jobs and his team at Apple invented the iPhone.

6 0
3 years ago
Read 2 more answers
What medical equipment do they have in Jr. high, To help save peoples lives?
lawyer [7]

Vital signs monitors, Electronic Medical Records (EMR), and Medication Management Systems.

5 0
3 years ago
________ is a remote access client/server protocol that provides authentication and authorization capabilities to users who are
iren [92.7K]

Answer:

Correct answer is (4)

Explanation:

Terminal Access Controller Access Control System

4 0
3 years ago
What is the full form of GDP
Andrej [43]

Answer:

gross domestic product

Explanation:

there are 4 different types, I don't know if that was what you were looking for but

I hope it helped :)

5 0
3 years ago
The computer mouse is used to
Murrr4er [49]
Make it easier to click, copy and paste,and open new tabs.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following works did mozart NOT write? A.the surprise symphony B. the magic flute C. eine kleine nachtmusik
    13·2 answers
  • Write the definition of a function named timeOnHighway that receives three parameters, all of type double: mileEndingPoint , mil
    14·1 answer
  • Write pseudocode instruction to carry out each of thefollowing computational operations.
    10·1 answer
  • What is the most likely result of a correctly installed processor, but an incorrectly installed cooler?
    6·1 answer
  • Write a function named "list_concat" that takes a list of strings as a parameter and returns the concatenation of all the values
    13·1 answer
  • Does anyone know what to do when brainly won't let you answer questions? I click on answer question and then it just sits there
    15·2 answers
  • Why would we need to consider implementing our business blockchain application not on Bitcoin but Ethereum?
    5·1 answer
  • What is computer virus?​
    12·1 answer
  • Yeoo check dis out!!!!!! wait my full vid dont show hol on
    7·2 answers
  • Value (related to the five 'v's' of big data) addresses the pursuit of a meaningful goal. true false
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!