Question: Use C to finish the code Complete this program by writing the function strip_q_marks that takes a single string and returns an integer. The function
Complete this program by writing the function strip_q_marks that takes a single string and returns an integer. The function should modify the string to remove any trailing question marks and return the number of question marks that were removed. Examples original sentence modified sentence return value "Hello? World?7?" "What..?" "Apples?..7 "Coffee" "Hello? World" "What.." "Apples?.." "Coffee" k/ // Write the function strip_q_marks here int main(int argc, char xkargv) != 2) if(argc { fprintf (stderr, "Usage: strip message ") exit(1); int result = strip-a_marks (argv [1]); printf("%s %d", argv [1], result); return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
