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
Julli [10]
3 years ago
6

Overview: In this problem, you will emulate the push_back function of the C vector class. We will call this function append . Th

is function will insert an element to an array at the smallest vacant index. In case the array is full, the function should perform array doubling and then insert the element to the new array.
Unlike the resize function (Recitation 3 exercise), here you will not be returning a pointer after doubling the array. Instead, a reference-to-array pointer will be passed to your function append , so that you can modify the pointer to the array itself. The function should return true if array doubling was performed, otherwise return false.
Use the function prototype provided below:
bool append(string* &str_arr, string s, int &numEntries, int &arraySize);
INPUT PARAMETERS:
→ str_arr is an array of type string in which you insert elements. A reference to this array pointer is passed to your function.
→s is a new string that you want to insert in your string array
→ numEntries keeps track of the number of elements that have been inserted in your array so far
→ array Size variable stores the current size of your array
OUTPUT PARAMETERS:
→ doubled is just a boolean value true or false
You return true if array has been doubled else return false
You are also required to update the variable numEntries and array Size within the function:
→ Update numEntries when you add a new element to the array.
→ Update array Size whenever you perform array doubling.
Computers and Technology
1 answer:
lbvjy [14]3 years ago
6 0

Answer:

idontttttttttttttttttt now please help me

You might be interested in
A sequence of one or more characters is called
irina [24]
A sequence of one or more characters is called STRING.
5 0
3 years ago
What are static components in a multimedia system?
Zielflug [23.3K]

Answer:

Text (words)

Video (.mp4 or you tube)

Pictures (graphic)

Animations (gifs or short cartoon clips)

5 0
3 years ago
Read 2 more answers
What type of engineer works on cleaning up oil spills?
Margaret [11]

your answer is b. i know this because oil is a chemical.

7 0
3 years ago
Read 2 more answers
A motorist is using the AHP to choose a new car from three possible models Arrow, a Bestmobile and a Commuter. The choice will a
Lynna [10]

Answer: i think the answer is A. Construct a hierarchy to represent the decision problem.

8 0
3 years ago
Read 2 more answers
In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
madam [21]

Answer:

Application Server

Explanation:

The Application Server is a component in computer engineering that presents the application logic layer in a three-tier architecture.

This functionality allows client components to connect with data resources and legacy applications.

In this process of interaction, the Application Server runs the program code from Tier 1 - Presentation, through Tier 2 - Business Logic to Tier 3 - Resources, by forcing through the business processes.

8 0
2 years ago
Other questions:
  • What is the outlined area called?
    6·1 answer
  • As you are researching RAM for a computer you are building that will be used as a home office server for his small business. The
    5·2 answers
  • When it comes to safety, the choice to be safe is often up to __________?
    8·1 answer
  • Indicate the time efficiency classes of the three main operations (i.e., FindMax, DeleteMax, and Insert) of the priority queue i
    11·1 answer
  • ____________ facilitates the processes that help an organization function by applying information and communication technologies
    5·1 answer
  • Making sure that your business has something special and distinct to offer is known as?
    12·1 answer
  • The first numerical control machine tool was demonstrated in 1952 in the United States at the Massachusetts Institute of Technol
    14·1 answer
  • Help me plzzzz ASAP T-T and it's Cyber Security but my last day of school is tomorrow and I'll graduate in June 24 so plzzzzz I
    12·1 answer
  • In 1980, IBM's cheapest computer was more affordable than Apple's.<br><br><br> True<br><br> False
    10·1 answer
  • I want the answer of this task ( using prolog language ) ASAP because the deadline is tomorrow. Please help :"
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!