Assignment

Please help me solve the question because I already try to code it but still got error.

Here is the questions:

Task 3
Using two arrays, named arr_A and arr_B respectively, write a function named
concantenate that join the values from arr_A to the values from arr_B according to their
sequence and stores the concatenated values in arr_C. Display the contents of arr_A,
arr_B and arr_C. The three arrays are declared as integer type

You help is much appreciated
thank you very much.
closed account (3qX21hU5)
We won't just give you the code for you to copy and paste sorry. Please post your code that you have tried and a detailed explanation involving what you don't understand, what you have tried, what isn't working, errors you get, ect.

Then we can help guide you in the right direction to solve your assignment.

Also please remember to use codetags when you paste your code to the forums. Hint: Highlight all the code you just pasted to the forum and click the <> button under Format:. This will make it much easier to read and help you get the questions you asked answered.
Last edited on
I not so sure of my answer please guide me.

#include <iostream>
using namespace std;

void concantenate(int arr_A, int arr_B, int total)
{
int arr_C;
for (int n=0; n<total; n++)
{
arr_C[n] = arr_A[n] + arr_B[n];
}

for (int n=0; n<total; n++)
{
cout << "arr_A = " << n << " " << arr_A[]
}

for (int n=0; n<total; n++)
{
cout << "arr_B = " << n << " " << arr_B[]
}

for (int n=0; n<total; n++)
{
cout << "arr_C = " << n << " " << arr_C[]
}
}

int main ()
{
int arr_A[] = {1,2,3,4,5};
int arr_B[] = {6,7,8,9,10};
concantenate(arr_A, arr_B, 5);
return 0;
}
closed account (3qX21hU5)
Since you totally ignored everything I said I'll pass, but who knows maybe someone else might.
Topic archived. No new replies allowed.