Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question #2: Write a function named replaceBlanks that accepts a pointer to a C-string (an array of characters with a NULL terminating character) and it
Question \#2: Write a function named "replaceBlanks" that accepts a pointer to a C-string (an array of characters with a NULL terminating character) and it will replace all blanks in that C-string array with question mark ('?'). It will return three values: - the number of blanks that it has replaced with '?' - the number of '?' that was already in the C-string - the boolean flag that is true if after replacement, the C-string is all '?' and false otherwise. For example, here are examples of C-string and its expected return values "One Two Three" will become "One?Two?Three" and it will return 2 blanks, 8 question mark and false "??" will become "????" and it will return 2 blanks, 2 question marks and true will become "?" and it will return 1 blank, 9 question mark and true will become "?" and it will return blank, 1 question mark and true will become "1" and it will return blank, question mark and false will become "n and it will return 8 blank, 0 question mark and false will become "1?" and it will return blank, 1 question mark and false will become "1?" and it will return 1 blank, 0 question mark and false
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started