Answer:
split string into words then, compare length of each word with variables small and large
Step-by-step explanation:
One of the approach to find smallest and largest word is to split string into words then, compare length of each word with variables small and large. If length of a word is less than length of small then, store that word in small. If length of a word is greater than length of large then, store that word in large.