Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Multiple Choice Questions

Q2601: In the code example, a subarray is sorted with qsort(), which is a ______ function.
  • A: standard library
  • B: user-defined
  • C: custom
  • D: multithreaded
View Answer
A

Q2602: What is the main advantage of using multiple threads in MergeSort?
  • A: Simplifies code
  • B: Reduces sorting time by parallelism
  • C: Uses less memory
  • D: Avoids file I/O
View Answer
B

Q2603: In the MergeSort multi-thread program, what must the number of threads be?
  • A: Any positive integer
  • B: A prime number
  • C: A power of 2
  • D: An odd number
View Answer
C

Q2604: What does the program require about the number of 64-byte records in the file?
  • A: Must be a prime number
  • B: Must be multiple of number of threads
  • C: Must be even
  • D: No restriction
View Answer
B

Q2605: What does 'SortThread' function do in this program?
  • A: Creates threads
  • B: Sorts a portion of the array
  • C: Merges arrays
  • D: Allocates memory
View Answer
B

Q2606: What Windows API function is used to map a file to memory in this program?
  • A: CreateFileMapping
  • B: CreateThread
  • C: ReadFile
  • D: WriteFile
View Answer
A

Q2607: What does the 'KeyCompare' function compare?
  • A: Data fields
  • B: Record sizes
  • C: Keys of records
  • D: Number of threads
View Answer
C

Q2608: How does the program ensure threads merge sorted parts correctly?
  • A: Using file pointers
  • B: Threads wait for adjacent thread
  • C: Using random access
  • D: Using external memory
View Answer
B

Q2609: Which function is responsible for merging two adjacent sorted arrays?
  • A: SortThread
  • B: MergeArrays
  • C: KeyCompare
  • D: MapViewOfFile
View Answer
B

Q2610: What happens if the number of threads exceeds the number of processors?
  • A: Performance improves
  • B: No effect
  • C: Performance degrades
  • D: Threads run sequentially
View Answer
C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now