Hello, stdin
Discover how to handle standard input in C programming by analyzing puzzle code. Learn to predict outputs and improve your understanding of input processing in C.
We'll cover the following...
Puzzle code
Read carefully the code given below:
Your task: Guess the output
Attempt the following test to assess your understanding.
What will be the output of the following code before and after pressing the “Enter” key?
Before pressing Enter:
Wait for it!
Wait for it!
Now!
After pressing Enter:
Whew!
Before pressing Enter:
Wait for it!
Wait for it!
Now!
Whew!
After pressing Enter:
Nothing new is printed.
Before pressing Enter:
Nothing is printed.
After pressing Enter:
Wait for it!
Wait for it!
Now!
Whew!
Before pressing Enter:
Wait for it!
Wait for it!
After pressing Enter:
Now!
Whew!
Let's discuss the code and output together in the next lesson.