Question 4:
(3 marks)
The given file Q4.c already contains statements to input a string named str and a character named ch.
You write the statements to count the number of occurrences of the character ch in the string str (notcase-sensitive).
Notes:
4 of 4
Paper No: 1
- 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:
Please enter a string: 12A3aaaABC
Please enter a character: a
After processing: result = 5
Output for marking:
OUTPUT:
5
Zoom
+ 100%
Close