C Language - Input/Output Questions and Answers

Practice Mode
Showing 10 of 54 questions
Q11
 Identify the correct statement. 
  • A C library functions provide I/O facilities
  • B C has inherent I/O facilities
  • C C doesn't have inherent I/O facilities.
  • D options a and c
Answer: Option D
Q12
 Header files in C contain 
  • A compiler commands
  • B library functions
  • C header information of C programs
  • D operators for files
Answer: Option B
Q13
 How are the library functions made available to a program?
  • A by using # define statements
  • B by linking loader to the program
  • C by using # include statements
  • D by using function declarations
Answer: Option C
Q14
 Identify the character-oriented console I/O functions.
  • A getchar () and putchar()
  • B gets () and puts ()
  • C scanf () and printf ()
  • D fgets() andfputs()
Answer: Option A
Q15
 What is the value returned by getchar () when an alphabet key is pressed ?
  • A the alphabet entered from the keyboard
  • B the ASCII value of the alphabet entered from the keyboard
  • C 0
  • D 1
Answer: Option B
Q16
 The function putchar () uses
  • A no argument
  • B one argument that is an ASCII value of a character
  • C two arguments; first one is ASCII value and thesecond one is number of characters
  • D one argument, that is a string
Answer: Option B
Q17
 The function getchar () uses
  • A no argument
  • B One argument that is a character variable
  • C oneargument that is the ASCII value of a character
  • D one argument, that is a string
Answer: Option A
Q18
 Identify the  wrong statement. 
  • A putchar (65)
  • B putchar ('x')
  • C putchar("x")
  • D putchar ('\n')
Answer: Option C
Q19
 The function scanf () returns
  • A the actual values read for each argument
  • B the number of successfully read input values
  • C no value (void)
  • D ASCII values of the characters read
Answer: Option B
Q20
 The function printf () returns 
  • A the actual values displayed for each argument
  • B no value (void)
  • C the number of characters displayed
  • D ASCII values of the characters read
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test