Question: (c++) Write a function words that receives a string and prints the number of words in that string provided that the string might have one
(c++) Write a function "words" that receives a string and prints the number of words in that string provided that the string might have one or multiple spaces between each word. 1) You can NOT use any selection structure or ternary operator. Hence, no "if", "switch", "?:" 2) you can only use a max of 1 loop.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
