GeeksforGeeks » Interview Questions
Amazon Hyderabad Online Written
(1 post)-
Please write a version of the unix utility "wc" in the language of your choice. You can expect the input to be a set of strings from STDIN
Sample Testcases:
Input #00:
aaa
fffOutput #00:
2 2 8Explanation:
wc displays the number of lines, number of words and number of bytes in the given inputInput #01:
aaa bbb ccc
fffOutput #01:
2 4 16
Reply
You must log in to post.