Compiling...
In the previous note, we learned how to display output using printf(). A program that only displays fixed data is not very useful. Real programs need to receive data from the user during execution and process it. In C, the primary function for reading input from the keyboard is scanf().
Like printf(), scanf() is also defined in stdio.h. The name stands for scan formatted — it reads data from standard input (the keyboard) according to a specified format.