Join Regular Classroom : Visit ClassroomTech

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.

Example:

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

Let’s see an example –

Explanation : In the code we have taken two inputs through “scanf()” function, for integer variables A and B, and that’s why we get an output 2.

Categories
Pages
Recent Posts