System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2891: InterlockedExchangeAdd() helps avoid preemption between ________.
- A: memory allocations
- B: increment steps
- C: function declarations
- D: file I/O
View Answer
B
Q2892: Interlocked functions are ________ to use in multi-threaded environments.
- A: discouraged
- B: illegal
- C: complex
- D: simple and fast
View Answer
D
Q2893: The return value of InterlockedIncrement() is the ________ value of the variable.
- A: original
- B: current
- C: new
- D: previous
View Answer
C
Q2894: Interlocked functions are declared to operate on variables of type ________.
- A: unsigned short
- B: double
- C: LONG volatile
- D: char*
View Answer
C
Q2895: Volatile variables ensure visibility of updated values across ________.
- A: registers
- B: threads
- C: disk
- D: buffers
View Answer
B
Q2896: InterlockedIncrement(&N); assumes that N is a ________ variable.
- A: static
- B: volatile integer
- C: unsigned char
- D: float
View Answer
B
Q2897: Interlocked functions improve performance by avoiding ________.
- A: multithreading
- B: memory leaks
- C: complex locking mechanisms
- D: type casting
View Answer
C
Q2898: InterlockedIncrement() and InterlockedDecrement() return values of type ________.
- A: char
- B: double
- C: LONG
- D: BOOL
View Answer
C
Q2899: Memory barriers help ensure proper sequence of ________ in multiprocessor systems.
- A: threads
- B: instructions
- C: cache loads
- D: memory operations
View Answer
D
Q2900: Calling InterlockedIncrement(&N) twice in sequence may lead to ________.
- A: accurate increment by 2
- B: synchronization
- C: thread preemption issues
- D: compiler error
View Answer
C