System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 6
Q201:
To generate platform-specific executables, ______ must be set correctly.
A. linker
B. header files
C. compiler configuration
D. OS version
Correct Answer:
C
Chapter: 7
Q202:
Which language functions like fopen() and fwrite() are used for file I/O operations?
A. Java
B. Python
C. C/C++
D. Assembly
Correct Answer:
C
Chapter: 7
Q203:
The function ______ is used to close a file in C.
A. fclose()
B. endfile()
C. closefile()
D. stop()
Correct Answer:
A
Chapter: 7
Q204:
Which I/O method allows cross-platform compatibility?
A. Windows API
B. Assembly routines
C. Standard C/C++ functions
D. Bash scripts
Correct Answer:
C
Chapter: 7
Q205:
Which of the following is a standard C library function for reading from a file?
A. fopen()
B. fread()
C. fclose()
D. fprint()
Correct Answer:
B
Chapter: 7
Q206:
Windows provides ______ to perform I/O operations.
A. standard C compiler
B. low-level system access
C. its own set of built-in APIs
D. fortran runtime support
Correct Answer:
C
Chapter: 7
Q207:
To perform inter-process communication and synchronization, it is better to use
A. Windows APIs
B. Standard C functions
C. Console input
D. POSIX headers
Correct Answer:
A
Chapter: 7
Q208:
If portability is the priority, developers should use
A. Assembly code
B. Windows headers
C. Standard C/C++ functions
D. Windows APIs
Correct Answer:
C
Chapter: 7
Q209:
Advanced features like asynchronous I/O and file locking are offered by
A. Standard I/O stream functions
B. Windows APIs
C. C++ templates
D. ANSI headers
Correct Answer:
B
Chapter: 7
Q210:
Which function is used in C to open a file?
A. open()
B. fileopen()
C. fopen()
D. readfile()
Correct Answer:
C
Chapter: 7
Q211:
Which is more suitable when writing Windows-specific applications?
A. Java APIs
B. Windows APIs
C. Standard C functions
D. Bash commands
Correct Answer:
B
Chapter: 7
Q212:
Standard C functions can run on Windows because
A. Windows supports Linux natively
B. Windows has low-level system calls to support them
C. Windows converts them into Java classes
D. None of the above
Correct Answer:
B
Chapter: 7
Q213:
Which of the following is not provided by standard C I/O functions?
A. File writing
B. Portability
C. Synchronization
D. Reading data
Correct Answer:
C
Chapter: 7
Q214:
Using standard C functions helps in
A. cross-platform compatibility
B. accessing Windows kernel
C. mode switching
D. memory paging
Correct Answer:
A
Chapter: 7
Q215:
Standard functions like fread() and fwrite() can be used to perform
A. looping
B. file I/O operations
C. window creation
D. network scanning
Correct Answer:
B
Chapter: 7
Q216:
Which function reads content from a file into memory in C?
A. fwrite()
B. fread()
C. fscanf()
D. fclose()
Correct Answer:
B
Chapter: 7
Q217:
Standard C I/O functions are suitable for ______ development.
A. Windows-only
B. Network-low level
C. portable and cross-platform
D. BIOS-level
Correct Answer:
C
Chapter: 7
Q218:
Standard C functions cannot perform Windows-specific features such as
A. reading input from user
B. accessing memory
C. locking, async I/O, inter-process communication
D. writing output
Correct Answer:
C
Chapter: 7
Q219:
Portability of code is improved by using
A. Windows Registry
B. C/C++ Standard Library
C. .NET Framework
D. Hardware Drivers
Correct Answer:
B
Chapter: 7
Q220:
Windows APIs should be used when
A. the goal is portability
B. limited memory is available
C. advanced Windows features are required
D. code is written in Java
Correct Answer:
C