(build 07.05.20.19)
3 of 3
Paper No: 10
Question 4:
(2 marks, file to be edited: Q4.c)
Your program allows users to enter 7 integer numbers into an array.
The system performs selection sorting of the array in ascending order then prints the sorted array. There is a space character between any two adjacent numbers.
Below is an example of how the program will run:
3
2 6
8
10
OUTPUT:
1 2 3 4 6 8 10
Press any key to continue
Question 5:
(2 marks, file to be edited: Q5.c)
Your program allows users to enter array of n integers, where n is entered by the user (n<20).
If the array is symmetric, the program displays: 1
Otherwise the program displays: 0
Below is some examples:
n=5 array = (2,2,3,2,2), symmetric
n=5 array = (2,2,3,4,2), asymmetric
Zoom
+ 100%
FUO