Problem 16
Write a program that demonstrates passing an array by value. [Hint: Use a struct.] Prove that a copy was passed by modifying the array copy in the called function.
Problem 18
The following program uses function multiple to determine whether the integer
entered from the keyboard is a multiple of some integer \(x\). Examine function
multiple, then determine the value of \(x\).
1 // Exercise 22.19: ex22_19.cpp
2 // This program determines if a value is a multiple of X.
3 #include
Problem 23
Write a program that inputs a line of text and a search string from the keyboard. Using function strstr, locate the first occurrence of the search string in the line of text, and assign the location to variable searchPtr of type char \(* .\) If the search string is found, print the remainder of the line of text beginning with the search string. Then use strstr again to locate the next occurrence of the search string in the line of text. If a second occurrence is found, print the remainder of the line of text beginning with the second occurrence. [Hint: The second call to strstr should contain the expression searchPtr +1 as its first argument.
Problem 25
Write a program that inputs several lines of text and a search character and uses function strchr to determine the total number of occurrences of the character in the lines of text.
Problem 28
Write a program that reads a series of strings and prints only those strings beginning with the letter "b."
Problem 29
Write a program that reads a series of strings and prints only those strings that end with the letters "ED."
Problem 30
Write a program that inputs an ASCII code and prints the corresponding character. Modify this program so that it generates all possible three-digit codes in the range 000255 and attempts to print the corresponding characters. What happens when this program is run?