Question 9:
(1 mark, file to be edited: Q9.c)
The program allows the user to enter 3 character strings: s1, s2 and s3 from the keyboard.
6 of 6
Paper No: 8
Search in string s1, if it contains characters similar to s2 then replace them with s3.
Print out the character string s1 after replacing the new character strings.
Below is an example:
Enter: s1 = "Chao mung ban den voi ngon ngu lap trinh C"; s2 = "ng"; s3 = "AB"
Chao mung ban den voi ngon ngu lap trinh C ng AB
OUTPUT:Chao muAB ban den voi ABon ABu lap trinh C Press any key to continue
Question 10:
(1 mark, file to be edited: Q10.c)
The program allows the user to ontor an array of n integers from the keyboard
Zoom
Close
+ 100%