Question

Explain the use of the functions getchar(), putchar(), gets() and puts() functions, with a suitable program

26 Feb 2024
Answer :
Word Count : 416
  1. getchar(): This function is used to read a single character from the standard input (usually the keyboard). It reads the next available character from the input stream and returns it as an unsigned char cast to an int or EOF on end-of-file or error.

  2. putchar(): This function is used to write a single character to the standard output (usually the console). It takes a character as an argument and writes it to the output stream.

  3. gets(): This function is used to read a line of text from the standard input (usually the keyboard). It reads characters from the input stream until a newline character or EOF is encountered, storing them in the string pointed to by the argument. It includes the newline character in the string and terminates it with a null character.

  4. puts(): This function is used to write a string

_________ ______ _________ ___ _______ ______ _____.
___ ______ ___ _______ __________ __________ _______ ____ _______ _________ __________ ___.
________ _______ ___ _________ _________ ______.
___ ___ __________ _________ ________ _____ _______ ____ ___ _____ ________.
_____ _________ ___ __________ ___ _____ ______ ___ _____.
_________ _____ ____ _________ _______ ________ _______ _____ ____ _______ _______.
____ ___ ______ _________ __________ ____ ______ ___ _______ _______ ____ _____.
________ ______ __________ ___ _____ ________ _____ ____ _____ _________.
____ ________ ______ _________ ________.
______ ___ ____ ____ _______ ___ ____ ____ ______ ________.
______ ___ ______ ___ ______ __________ __________ __________ ______ __________ ______.
______ ________ _________ _____ ____ ____ ___.
______ ___ ________ ___ _______ _____ __________ _____ ___ _______ _______ _________.
____ ___ __________ ______ __________ _________ ___ _________ _________ _____ _______ ______.
______ ___ _____ ______ _________ _______ _________.
_______ __________ ___ __________ __________ _______ __________ ____ _________ _____.
______ __________ ______ ________ ______ _________ ________ _________ _______.
______ _________ _________ ______ ____ ______.
_______ ___ _______ _______ _______ ___.
___ _______ ______ _______ __________.
___ ____ _____ ____ ____ _________ ______ ________.
___ ____ _____ ________ ____ ___ ______.
___ _________ ____ _____ ___ _____ __________ _____ ____ _______ ______.
_________ ____ _______ ___ ___ ____ __________ __________ ______.
________ _______ _____ __________ _____ __________ ____ ________ ____ _______ _____.
_________ ___ _______ _____ ___ _______ _________ _____ __________ ______.
____ __________ __________ ______ ____ ________ _____ ________ ___.
___ ________ _________ ________ ___ __________ ____ _____ _______ ____.
____ ___ _____ _________ _______ _____ __________ ______ ________ _____ ________.
__________ _______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MMT 1 2024 - Explain the use of the functions getchar(), putchar(), gets() and puts | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→