C Programming MCQ Questions and Answers

Take Exam

C Programming MCQ questions with answers are a favorite in programming interview questions with answers for software placement exams like TCS, Infosys, and Wipro. The C language forms the base for all modern programming, focusing on data types, control structures, loops, arrays, and pointers. This section provides a curated set of multiple-choice questions designed to test your coding logic and understanding of C fundamentals. Practice these questions regularly to build confidence and accuracy in technical interviews and coding assessments.

C Programming MCQ

Showing 10 of 25 questions

1. File is a

  • a data type
  • a region of storage
  • both options a and b
  • a variable
Show Answer Report

2. The way to access file contents from a program is

  • by using library functions
  • by using system calls
  • both options a and b
  • to use a linker
Show Answer Report

3. Low level files are accessed through

  • system calls
  • library functions
  • linker
  • loader
Show Answer Report

4. A stream is

  • a library function
  • a system call
  • a source or destination of data that may be associated with a disk or other I/O devices
  • a file
Show Answer Report

5. I/O stream can be

  • a text stream
  • a binary stream
  • both options an and b
  • an I/O operation
Show Answer Report

6. File opening is

  • a default action in file processing
  • an action o connecting a program to a file
  • not necessary
  • not using any library function
Show Answer Report

7. FILE defined in stdio.h is

  • a region of storage
  • a data type
  • not a data type
  • a variable
Show Answer Report

8. A file pointer is

  • a stream pointer
  • a buffer pointer
  • a pointer to FILE data type
  • all the above
Show Answer Report

9. The default stream pointers available during execution of a program is

  • stdin
  • stdout
  • stderr
  • all the above
Show Answer Report

10. The function call fopen("data", "w+b)

  • in valid.
  • returns the filepointer pointing to file named data and opens the file tor read and writing using binary stream
  • returns the file pointer pointing to file namea data and opens the file for read and writing using text stream
  • does not return file pointer
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test