printf() and scanf() in C


printf() function

The printf() and scanf() functions are used for input and output in C language. Both functions are inbuilt library functions, defined in stdio.h (header file).

printf() function

The printf() function is used for output. It prints the given statement to the console.

The syntax of printf() function is given below:


  1. printf("format string",argument_list); 


scanf() function

The scanf() function is used for input. It reads the input data from the console.



  1. scanf("format string",argument_list); 


Jay Kakadiya

Jay Kakadiya Creator

I am a computer field, & i am Web developer.

Suggested Creators

Jay Kakadiya