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
What is an assembler?
Flauer [41]

an assembler is a program that converts code written in a high-level language to assembly language that the computer processor can execute.

4 0
3 years ago
Learning Management Systems (LMS) allow students to interact with each other, but NOT their teachers.
VMariaS [17]

Answer:

what do you mean friend not for teacher

8 0
3 years ago
Read 2 more answers
Which process could you use to add a table to a document?
Lady_Fox [76]
These are the steps you would take..

click on insert at the bar on the top of the document  processor (Word,Google Docs ect.) >>Click table drag as many columns and rows as you need!
I hope this helps!
6 0
3 years ago
It can be hard to get close enough to photograph animals in the wild true or false
marysya [2.9K]

Answer:

True

Explanation:

8 0
3 years ago
Read 2 more answers
Sam wants to move across the text and his documents to add data at predefined stops. Which key will Hughes to navigate through t
Setler [38]

Answer:

The TAB key

Explanation:

Sam would use the TAB key, located on the left side of the keyboard, to move around his document to add stops and format its information properly.

Pressing the TAB key will introduce a tab code in his document, which is like moving ahead by a certain number of spaces (5,6, 10 spaces for example, depending on the configuration of the document), but without using spaces, using a tab which is a much better option to position, align things up.

5 0
4 years ago
Other questions:
  • A company is a Microsoft 365 reseller. The company does not provide managed services or direct customer support. You need to pro
    10·1 answer
  • What Is the output of the following: =OR (5 <7, 16*Rand ()>23,FALSE)
    5·1 answer
  • List 5 different programming languages calls to print
    8·2 answers
  • Select four programs that make up system software.Select four programs that make up system software.
    8·1 answer
  • What is it called when you make a reference in the text of a document alerting the reader that you are using information from an
    10·1 answer
  • When a communication exchange that does not verify the identity of the endpoints of a communication and accepts any properly for
    10·1 answer
  • Casey, a woodworker, is developing his own website. He plans to use the site as a means of selling his handmade furniture. While
    10·1 answer
  • What property of semi-metals is useful in the computer industry?
    7·1 answer
  • interpret the following SQL create table persons (person I'd int, last name varchar (255) first name varchar (255) address varch
    7·1 answer
  • (20points)
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!