What is the use of printf() and scanf() functions ?

Scanf()

  • Scanf() is the most commonly used in C langauage.
  • They are inbuilt functions in the c program which is in the stdio.h(header file).
  • It is an input function in the c program that takes input values from the user.
  • It is a function that reads formatted data from stdin(standard input stream), which is keyboard, unless redirected, and then writes the results to arguments.

Printf()

  • Printf() is used to display the output.
  • They are inbuilt functions in the c program which is in the stdio.h(header file).
  • It is a function that prints a string on the screen using a format string that contains mix of several strings.
  • It produces a final string to be printed on the screen.
  • It is an output function in the c program that prints output values to the console.

 

Leave a Reply

Your email address will not be published.

You May Also Like