Question: Please use C language to answer the following question. Write a program that read two integer array and swap two arrays. You need to create
Please use C language to answer the following question.
Write a program that read two integer array and swap two arrays. You need to create a swap function using the two integer arrays in the list of arguments. Moreover, in this program, you can only use a pointer instead of an integer to keep track of the current position in the array.
The first input is: "The length of array", the second input is: "The 1st array", and the third input is: "The 2nd array".
| Input Example | Output Example |
|---|---|
| 3 1 2 3 4 5 6 | 1st array: 4 5 6 2nd array: 1 2 3 |
| 2 100 156 234 2030 | 1st array: 234 2030 2nd array: 100 156 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
