Question: C++ Implement the following two functions: -Invoke the function by passing the pointer of a string array, and return the size of the string array:

C++

Implement the following two functions:

-Invoke the function by passing the pointer of a string array, and return the size of the string array:

int count_char(constchar *)

-Invoke the function by passing the pointers of two string arrays. The content of the second string array will be appended to the end of the first string array:

void concatenate(char *, constchar *);

I am having trouble understanding how to use pointers correctly with functions, in this case, using them with string arrays and the given functions.

Here is my code so far without the two functions intcount_char(constchar *) and void concatenate(char *, constchar *);

_____________________

#include

#include

using namespace std;

int main()

{

string s1, s2, s3;

s1 = "Do you enjoy coding in C++?";

cout

getline(cin, s2);

cout

getline(cin, s3);

cout

cout

cout

cout

cout

cout

cout

}

_____________________

Here is my code again and what the output is supposed to look like:

C++ Implement the following two functions: -Invoke the function by passing the

COMP251C++ (Global Scope) main 4. 6 7 8 #include using namespace std; int main() string s1, s2, s3; 12 13 s1 = "Do you enjoy coding in C++?" cout LabAss 1>COMP25 1>COMP25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!