Give a sentence, print different words present in it. Words are separated by space.
Examples:
Input : str = "Geeks for Geeks"
Output : Geeks
for
Geeks
Explanation : All space separated words
are printed line by line.
Split a sentence into words in C++ : https://www.geeksforgeeks.org/split-a-sentence-into-words-in-cpp/