count the number of lines, words, and characters within an input

前端 未结 6 1913
礼貌的吻别
礼貌的吻别 2021-01-19 06:20

Right now I am going through a book on C and have come across an example in the book which I cannot get to work.

#include 
#define IN 1
#defin         


        
6条回答
  •  囚心锁ツ
    2021-01-19 06:47

    getchar() returns the input from the standard input. Start typing the text for which you want to have the word count and line count. Your input terminates when EOF is reached, which you do by hitting CTRL D.

    CTRL D in this case acts as an End Of Transmission character.

    cheers

提交回复
热议问题