1. Engineering
  2. Computer Science
  3. 1 write a program in c that reads in two...

Question: 1 write a program in c that reads in two...

Question details

1. Write a program in C that reads in two arrays (a1 and a2) of numbers and creates a new array (a3) of numbers such that the new array contains all the unique numbers of a1 and a2. Assume the input array elements are unique elements. In the main function, ask the user to enter the length of each array, declare and reads in the numbers for each array, and calculate and display the output array.

Example input/output #1:

Enter the length of array 1: 5

Enter the elements of the array: 8 4 1 3 9

Enter the length of array 2: 3

Enter the elements of the array: 5 4 8

Output array: 8 4 1 3 9 5

Example input/output #2:

Enter the length of array 1: 4

Enter the elements of the array: 3 4 1 7

Enter the length of array 2: 2

Enter the elements of the array: 6 9

Output array: 3 4 1 7 6 9

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution