Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Buddy Dog Foods management to change its focus?

Answered: 1 week ago

Question

1. Which is the most abundant gas presented in the atmosphere?

Answered: 1 week ago

Question

=+ How well do you think you could do your job?

Answered: 1 week ago