subject
Computers and Technology, 18.06.2020 15:57 keke515

Finish and test the following two functions append and merge in the skeleton file: (1) function int* append(int*,int, int*,int); which accepts two dynamic arrays and return a new array by appending the second array to the first array.
(2) function int* merge(int*,int, int*,int); which accepts two sorted arrays and returns a new merged sorted array.
#include
using namespace std;
int* append(int*,int, int*,int);
int* merge(int*,int, int*,int);
void print(int*,int);
int main()
{ int a[] = {11,33,55,77,99};
int b[] = {22,44,66,88};
print(a,5);
print(b,4);
int* c = append(a,5,b,4); // c points to the appended array=
print(c,9);
int* d = merge(a,5,b,4);
print(d,9);
}
void print(int* a, int n)
{ cout << "{" << a[0];
for (int i=1; i cout << "," << a[i];
cout << "}\n"; }
int* append(int* a, int m, int* b, int n)
{
// wru=ite your codes in the text fields
}
int* merge(int* a, int m, int* b, int n)
{
// wru=ite your codes in the text fields
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Plz ( which is an example of a good url?
Answers: 1
question
Computers and Technology, 24.06.2019 11:20
Colby works as a shipping clerk for a major package delivery service. some of his daily tasks include tracking shipments and entering orders. which aspect of the information technology cluster would he most likely be trained in? a.networkingb.databasesc.hardwared.software
Answers: 2
question
Computers and Technology, 24.06.2019 13:00
Think of a spreadsheet as a giant calculator spread of paper chart data collector
Answers: 2
You know the right answer?
Finish and test the following two functions append and merge in the skeleton file: (1) function int...
Questions