Question
C language. You are given two arrays, ArrayA and ArrayB. ArrayA has a large enough buffer at the end to hold ArrayB. Write a Function
C language. You are given two arrays, ArrayA and ArrayB. ArrayA has a large enough buffer at the end to hold ArrayB. Write a Function to merge ArrayB into ArrayA. Then, write another Function to sort the final Array (bubble sort). Implementation instructions: Declare one array of size 20 for arrayA and one array of size 5 for ArrayB. Initialize array ArrayA by inputting 15 integers (in any order), and Initialize ArrayB by inputting 5 integers (in any order). (Note: do not hard code the values of the arrays; user enters the values of two arrays) Merge ArrayB with ArrayA. Sort the updated array ArrayA (using bubble sort) Print out the updated (and sorted) array A (after merging with ArrayB). Example: If your input for ArrayA is: 1, 3, 11, 15, 16, 25, 34, 54, 56, 59, 64, 92, 98,4,6 and your input for ArrayB is: 2, 100, 5, 19, 40 Finally, after merging and sorting Arrays A and B, Array A becomes: Output: 1, 2, 3, 4, 6, 5, 11, 15, 16, 19, 25, 34, 40, 54, 56, 59, 64, 92, 98,100
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started