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.

 

Categorized in: