scanf() Statement

"scanf()" statement:

“scanf()” is a C library function from the header file “stdio.h”(stdio – standard input output), which allows the programmer to accept input from standard input devices(Keyboard). The taken input is stored in a variable.


“scanf()” function returns the total number of input taken, which is an integer value.

Let’s see an example –