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
1 Which skill-based video game requires quick reflexes and skills with weapons?
kirill [66]

The Answer to Number 1 is Shooter Games

The Answer to Number 2 is Dice Throwing

The Answer to Number 3 is Games are organized play

The Answer to Number 4 is Either Simulation or Adventure

The Answer to Number 5 is Stories have no rules to follow, you can learn from countless other lifetime through stories

The Answer to Number 6 is Setting

The Answer to Number 7 is False

The Answer to Number 8 is Objective

7 0
3 years ago
PLEASE-I'M STUCK!!!!!!!!!!!!!!!!!!!!!!
Blababa [14]

Answer: Input is the answer.

8 0
2 years ago
Building relationship during your carrer exploration is called
Paul [167]

Answer:

Building relationships during your career exploration is called <u>networking</u>.

4 0
3 years ago
When was the very first computer made??
marshall27 [118]

1936

First programmable computer. The Z1 was created by German Konrad Zuse in his parents' living room between 1936 and 1938. It is considered to be the first electromechanical binary programmable computer, and the first really functional modern computer.

8 0
3 years ago
01000100 01101111 00100000 01111001 01101111 01110101 00100000 01101011 01101110 01101111 01110111 00100000 01111001 01101111 01
Anna71 [15]
This was quite tricky but, I found a program online that answers your question. The answer is (Do you know your binary code? Answer this in binary code)
5 0
3 years ago
Read 2 more answers
Other questions:
  • What is an example of constructive criticism for an employee who is shy during meetings?
    15·2 answers
  • What part of the computer gives access to the internet
    10·1 answer
  • Q1: what is significant about the contents of the destination address field?
    12·2 answers
  • What is internet marketing??
    13·1 answer
  • Choose the type of collection created with each assignment statement
    10·1 answer
  • Which of the following is the best description of the [Drive for] block?
    15·1 answer
  • David plays racing games on his way to work. He uses the analog stick to navigate his vehicle through other artificial intellige
    7·2 answers
  • Why is the central limit theorem so important to the study of sampling distributions?
    15·1 answer
  • Which option ensures that items in a text box or table cell will be in the absolute center of that element?
    12·1 answer
  • Flash drive / USB is ___________ device. A)Input B)Output C)Internal D)None of these
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!