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]
2 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]2 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
Imagine you accidently mistype the URL for your bank and you are redirected to a fake website that collects your information. Wh
fgiga [73]

Answer:

Financial identity theft

Explanation:

Financial identity theft is a fraudulent act that involves accessing someone's personal information without their consent or approval for fraudulent financial gain.

A typical financial identity theft is someone stealing your credit card information such as pin, cvv, etc. to make other financial transactions without your knowledge.

7 0
3 years ago
The ________ view in access looks similar to an excel spreadsheet.
ch4aika [34]
Datasheet 
<span>The datasheet view in access looks similar to an excel spreadsheet.</span>
6 0
3 years ago
Which country began expanding its borders with exploration in the late 16th<br>century?​
Lapatulllka [165]

Answer:

England began expanding its border with exploration in the late 16th century.

Explanation:

During the age of discovery, which is a period of exploracion protracted from 15th century to 16th century, different overseas travels were carried out in order to explore and that resulted in the appropiation of other lands.  England, France, and the Netherlands began to establish colonies and trade networks of their own in the Americas and Asia.

8 0
3 years ago
TLE 10 - ICT
Kipish [7]

Answer:

Information And Communication Technology

5 0
2 years ago
What are the steps of active listening?
SashulF [63]
1 prepare mentally
2 pay attention
3 allow the speaker to talk without interruption until he is done
4 provide feedback
5 repeat the feedback until you and the communicator are satisfied that the message was conveyed well
7 0
2 years ago
Other questions:
  • You just brought a new hard drive for your computer. U plan to use this as a secondary hard drive to store all your uma files. O
    10·1 answer
  • If you press the tab key when you're in in the last cell of a table,
    10·1 answer
  • John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
    13·1 answer
  • ________ software provides a means of sharing, distributing, and searching through documents by converting them into a format th
    13·1 answer
  • Liquid water can change into a gas and become part of the air. When water is a gas, what is it called?
    7·1 answer
  • A building is equipped with light sensors that turn off the fluorescent lights when natural light is above a certain brightness.
    5·1 answer
  • Which type of optical scanner works in a manner similar to a copy machine?
    15·1 answer
  • Where do charts get the data series names?
    14·1 answer
  • ASAP BRAINLIEST!!!
    10·1 answer
  • _____ refers to the programs that a device can run.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!