List any five built-in functions and explain any two of them.

08 c]List any five built-in functions and explain any two of them.

Answer:-

  1. printf()
  2. scanf()
  3. puts()
  4. gets()

printf() :-

  • In C programming language, printf() function is used to print the (“character, string, float, integer, octal and hexadecimal values”) onto the output screen.
  • We use printf() function with %d format specifier to display the value of an integer variable.

scanf() :-

  • In C programming language, scanf() function is used to read character, string, numeric data from keyboard
  • Consider below example program where user enters a character. This value is assigned to the variable “ch” and then displayed.

Leave a Reply

Your email address will not be published. Required fields are marked *