1.

What is the use of printf() and scanf() functions? Also explain format specifiers?

Answer»
  • printf() is used to print the output on the DISPLAY.
  • scanf() is used to read formatted data from the keyboard. 

Some datatype format SPECIFIERS for both printing and SCANNING purposes are as follows:

  • %d: It's a datatype format specifier for printing and scanning an integer value. 
  • %s: It's a datatype format specifier for printing and scanning a string. 
  • %C: It's a datatype format specifier for displaying and scanning a character value.
  • %F: The datatype format specifier %f is used to display and scan a float value.


Discussion

No Comment Found