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
True or false: you should reuse passwords on multiple websites because it will help you remember those passwords
Fudgin [204]

Answer: False

Explanation: Even though you can remember it is not really good because some hackers can track you passwords through those websites and could hack your account.

3 0
3 years ago
Read 2 more answers
Online Book Merchants offers premium customers 1 free book with every purchase of 5 or more books and offers 2 free books with e
docker41 [41]

Answer:

8/9

Explanation:

i remember this question on my daughters book

8 0
3 years ago
You need to increase the security of your linux system by finding and closing open ports. which of the following commands should
spayn [35]
Netstat -pan | more


-----------------------------------------------------
5 0
3 years ago
The ________ is a keyboard form based on the principle of voices imitating each other.
Brut [27]

A fugue is a keyboard form founded on the principles of voices imitating each other.

What is a fugue?

In theme, a fugue is a contrapuntal compositional process in two or more voices, built on a topic (a musical theme) that is presented at the beginning in imitation (repetition at other pitches) and which recurs often in the course of the design. It is not to be misunderstood with a figuring tune, which is a style of a song popularized by and mostly limited to early American music and West Gallery music. A fugue usually has three main areas: an exposition, a story, and a final admission that includes the return of the issue in the fugue's remedy key. Some fugues have a recapitulation.

To learn more about fugue, refer to:

brainly.com/question/1132239

#SPJ4

The complete question is:

The ________ is a keyboard form based on the principle of voices imitating each other.

a. fugue

b. prelude

c. suite

d. toccata

7 0
1 year ago
Write the statement that includes a friend function named before in the class dateType that takes as parameters two objects of t
Lerok [7]

Answer:

In opp friend function is a function that gives the same access to private and protected data. It is declared in class that is granting access.

Explanation:

#include<iostream.h>

using namespace std;

class Sum

{

 int a, b, add;

 public:

 void input()  

{

 cout << "Enter the value of l and m:";

 cin >> l>>m;     taking input from users

}

 friend void add(sum &t);

 void display()  

{

  cout << "The sum is :" << z;

}

};

 void add(sum & p)  

{

  p.add = p.a + p.b;

}

 int main()  

{

  sum p1;

  p1.input();

  add(p1);

  p1.display();

  return false;  

if(display==5)  

{

 return true;  //true is returned if sum is equal to 5

}

else        //if they are not the same

{

 return false;

}

}

8 0
3 years ago
Other questions:
  • How do networks help protect data? -by preventing access by more than one person at a time -by restricting access to department
    11·2 answers
  • _____ is the unauthorized entry into a computer system via any means
    9·1 answer
  • You can use this effect to break a color into a percentage of its full strength.
    13·1 answer
  • The machine should not be oiled until the
    11·1 answer
  • Which of these is not the correct method for moving text in a document in Word 2016?
    14·2 answers
  • How was science used to make television?
    6·2 answers
  • The…..executed simple
    8·2 answers
  • What role does the automated surface observing system.
    5·2 answers
  • Please select the word from the list that best fits the definition<br><br> Plagiarism
    5·2 answers
  • You discover that the lecturers will be using the laptops for online and video lecturing, and you see the need to upgrade the RA
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!