Question: my current program is as shown #include #include void printArray(vector array, int n) { for(int i=0; i

my current program is as shown

#include #include

void printArray(vector array, int n) { for(int i=0; i

int EfficientBubbleSort(vector A, int n) { int exchange, i, j, temp; for (i = 0; i

int MergeArrays(vector A,vector B, vector C, int n1, int n2) { for(int i = 0; i

int main() { int C[40], Asize, Bsize, Csize; vector A,B,C; int a,b; printf(" Enter elements to first array: "); scanf("%d", &a); A.push_back(a); printf(" Enter elements to second array: "); scanf("%d",&b); B.push_back(b); Asize = A.size(); Bsize = B.size(); printf(" First array elements in their original order:"); printArray(A, Asize) ; printf(" Second array elements in their original order:"); printArray(B, Bsize) ; EfficientBubbleSort(A, Asize); EfficientBubbleSort(B, Bsize); printf(" First array elements in their sorted order:"); printArray(A, Asize) ; printf(" Second array elements in their sorted order:"); printArray(B,Bsize) ; Csize = MergeArrays(A, B, C, Asize, Bsize); EfficientBubbleSort(C, Csize) ; printf("The new merged array in their sorted order:"); printArray(C, Csize) ;

}

however there are about 70 errors, the key points being that printarray, mergearray vector and identifyers A and B being undefined, why is it that this program is failing, i feel like im missing a key point

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!