C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 25 questions
Q1
File is a
  • A a data type
  • B a region of storage
  • C both options a and b
  • D a variable
Answer: Option B
Q2
The way to access file contents from a program is
  • A by using library functions
  • B by using system calls
  • C both options a and b
  • D to use a linker
Answer: Option C
Q3
Low level files are accessed through
  • A system calls
  • B library functions
  • C linker
  • D loader
Answer: Option A
Q4
A stream is
  • A a library function
  • B a system call
  • C a source or destination of data that may be associated with a disk or other I/O devices
  • D a file
Answer: Option C
Q5
I/O stream can be
  • A a text stream
  • B a binary stream
  • C both options an and b
  • D an I/O operation
Answer: Option C
Q6
File opening is
  • A a default action in file processing
  • B an action o connecting a program to a file
  • C not necessary
  • D not using any library function
Answer: Option B
Q7
FILE defined in stdio.h is
  • A a region of storage
  • B a data type
  • C not a data type
  • D a variable
Answer: Option B
Q8
A file pointer is
  • A a stream pointer
  • B a buffer pointer
  • C a pointer to FILE data type
  • D all the above
Answer: Option D
Q9
The default stream pointers available during execution of a program is
  • A stdin
  • B stdout
  • C stderr
  • D all the above
Answer: Option D
Q10
The function call fopen("data", "w+b)
  • A in valid.
  • B returns the filepointer pointing to file named data and opens the file tor read and writing using binary stream
  • C returns the file pointer pointing to file namea data and opens the file for read and writing using text stream
  • D does not return file pointer
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test