Written by - Vanshika Yadav

scanf and printf in C


printf() and scanf() functions are inbuilt library functions in the C programming language which are available in the C library by default.
These functions are declared and defined in “stdio.h” which is a header file in C language.
printf() function is used to print the “character, string, float, integer, octal & hexadecimal values” onto the output screen.

We use printf() function with %d format specifier to display the value of an integer variable.
C is case senstive language thus Printf if different from printf.
scanf() function is used to read character,string and numeric data from keyboard.