|
yep, JJoSA has it. The program you are compiling reads each character you enter from the keyboard in a loop until it reaches a special character called an End Of File (EOF) character. Your standard keyboard doesn't include this special character so you have to send it using a control sequence. Under linux the control sequence for an EOF is to hold the control key and press 'd' (Commonly presented as Ctrl-D).
So, run the program, type your message that you want character counted and when you've finished press Ctrl-D.
The control sequence that abc123 stated (Ctrl-Z) suspends a process (puts it in the background). To explain this i'd have to go into kernel process schedulers and i'll be here for hours. The best book in my opinion to describe kernel processes is Operating Systems by Andrew Tanenbaum.
Hope this helps.
|