First Word

Write a program that reads an input file of several lines, fetches and prints the first word from each line and discards the rest of the line. A word is defined as a sequence of characters, separated by spaces, tabs or newlines.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.