Kizspy.me
(2 marks)
The given file Q3.c already contains statements to input data for the integer 1-D array and an integer
variable named x. You will write statements to find whether x is in the array or not. If found then print
all the positions of the x in the array (each position separated by a space), otherwise print the last
element of the array.
Notes:
- You can create new functions if you see it is necessary.
-Do not edit given statements in the main function.
Sample input and output:
-Input: n = 7
Array: 1254 232
x: 2
After processing: 146
Output for marking:
OUTPUT:
146
-Input: n=5
Array: 12547
x=9
After processing: 7
Output for marking:
OUTPUT:
7
Question 4:
(3 marks)
The given file Q4.c already contains statements to input data for a string. You should write
statements to count the upper letter of its.
Zoom

FUO
+ 100%
Close