System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q221: ______ provides cross-platform compatibility for file I/O operations.
- A: Standard C/C++ functions
- B: Windows DLLs
- C: Visual Basic
- D: Console scripts
View Answer
A
Q222: To access Windows-specific features, ______ should be used.
- A: Standard Library
- B: Windows APIs
- C: OS Kernel
- D: Batch files
View Answer
B
Q223: fopen(), fread(), fwrite(), and fclose() are functions used for ______ operations in C.
- A: graphics
- B: memory
- C: file
- D: network
View Answer
C
Q224: Which function is used to open a file in binary read mode in C?
- A: open()
- B: fopen()
- C: fread()
- D: fwrite()
View Answer
B
Q225: The function used to read data from a file in C is ______.
- A: fwrite()
- B: printf()
- C: fread()
- D: open()
View Answer
C
Q226: To write data to a file in C, we use
- A: recv()
- B: fwrite()
- C: fprintf()
- D: fcopy()
View Answer
B
Q227: Which buffer size is used in the example file copy program?
- A: 512 bytes
- B: 128 bytes
- C: 256 bytes
- D: 1024 bytes
View Answer
C
Q228: The C macro used to define buffer size in the program is
- A: #size
- B: #define
- C: #include
- D: #macro
View Answer
B
Q229: If a file fails to open, which function is used to print an error message?
- A: perror()
- B: printf()
- C: fprintf()
- D: errorlog()
View Answer
A
Q230: How many command-line arguments must be passed to run the program correctly?
- A: 1
- B: 2
- C: 3
- D: 4
View Answer
C