GeeksforGeeks » Interview Questions

Amazon Hyderabad Online Written

(1 post)
  • Started 3 months ago by gupta5035

Tags:

  1. gupta5035
    Member
    Posted 3 months ago #

    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
    fff

    Output #00:
    2 2 8

    Explanation:
    wc displays the number of lines, number of words and number of bytes in the given input

    Input #01:
    aaa bbb ccc
    fff

    Output #01:
    2 4 16


Reply

You must log in to post.

RSS feed for this topic