System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2121: WAIT_FAILED is returned when the function ______.
- A: completes successfully
- B: is interrupted
- C: fails due to an error
- D: times out
View Answer
C
Q2122: WAIT_TIMEDOUT means the wait function ______.
- A: was interrupted
- B: returned successfully
- C: timed out before completion
- D: got access
View Answer
B
Q2123: WAIT_OBJECT_0+n is used when multiple ______ are signaled.
- A: threads
- B: objects
- C: handles
- D: files
View Answer
B
Q2124: What does an Environment Block contain for a process?
- A: Executable files
- B: Environment strings
- C: System calls
- D: Memory addresses
View Answer
B
Q2125: Each string in the Environment Block is terminated by which character?
- A: Null character
- B: Space
- C: Tab
- D: Comma
View Answer
A
Q2126: Which of the following is an example of an environment variable?
- A: PATH
- B: PROCESS_QUERY_INFORMATION
- C: EXIT_CODE
- D: MAXIMUM_WAIT_OBJECTS
View Answer
A
Q2127: Which API is used to get the value of an environment variable?
- A: GetEnvironmentVariable()
- B: SetEnvironmentVariable()
- C: CreateProcess()
- D: TerminateProcess()
View Answer
A
Q2128: Which API is used to set or modify an environment variable?
- A: GetEnvironmentVariable()
- B: SetEnvironmentVariable()
- C: CreateProcess()
- D: ExitProcess()
View Answer
B
Q2129: In SetEnvironmentVariable(), what happens if lpValue is NULL?
- A: The variable value is set to empty
- B: The variable is deleted
- C: The variable value is unchanged
- D: A new variable is created
View Answer
B
Q2130: If the environment variable already exists and SetEnvironmentVariable() is called with a new value, what happens?
- A: The variable is deleted
- B: The variable value is modified
- C: The variable is duplicated
- D: The variable is ignored
View Answer
B