Array and Strings – Strings – Problem #4
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: easy
Problem Statement
1. Write a program to read a full line of text from the keyboard and display the different words in it, one word per line. (Hint: The format for reading a full line of text from keyboard is %[^\n]). Example: Entered input string: India is a great country Display: India is a great country