This program reads an integer N from the user. You should write 2 functions:
- readArray - takes an integer array and the integer N as parameters. This function should read N more integers from the user and put them in the array.
- reverseArray - takes an integer array and the integer N as parameters. This function should reverse the order of N elements in the array.
At last the program prints the elements of the array. You will NOT write any printf statements.
Examples:
5
1 2 3 4 5
|
5 4 3 2 1
|
7
5 1 32 6 9 5 2
|
2 5 9 6 32 1 5
|
4
14 13 12 11
|
11 12 13 14
|
5
-2 -5 0 4 -11
|
-11 4 0 -5 -2
|
Important issues about all exams/projects/quizzes:
- Update just Question.c file, not Question.txt.
- Make changes only between the following comments(DO NOT modify these comments or anything outside the region marked by the comments):
- // DO_NOT_EDIT_ANYTHING_ABOVE_THIS_LINE
- // DO_NOT_EDIT_ANYTHING_BELOW_THIS_LINE
- If you modify these comments for any reason, you can copy/paste the initial version from Question.txt into Question.c. Note that Question.txt is not graded at all, so anything you write in Question.txt will be discarded.
- To avoid getting the 'Binary Not Found' error, SAVE and BUILD your code before RUN.
- Do not add any extra messages message for input/output such as 'Enter an integer:', 'The result is:', etc. Any additional text that appears in the output will cause you to get no points from the question.
- Input and output of your program must be just like those in the Examples table above.