System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2141: CREATE_HANDLE access right allows a process to ______.
- A: Create handles
- B: Terminate process
- C: Query process info
- D: Set environment variables
View Answer
A
Q2142: Environment variables are stored as strings of the form ______.
- A: Name=Value
- B: Name:Value
- C: Name-Value
- D: Name/Value
View Answer
A
Q2143: When a new environment variable is created, the variable name must not contain ______.
- A: Spaces
- B: Equals sign
- C: Underscores
- D: Dashes
View Answer
B
Q2144: To delete an environment variable, set its value to ______ in SetEnvironmentVariable().
- A: Empty string
- B: NULL
- C: DELETE
- D: 0
View Answer
B
Q2145: SetEnvironmentVariable() requires which two parameters?
- A: lpName and lpValue
- B: lpBuffer and nSize
- C: hProcess and uExitCode
- D: hHandle and timeout
View Answer
A
Q2146: Is it possible for child process to inherit parent’s environment block?
- A: No
- B: Yes
- C: Only with special privileges
- D: Only if set explicitly
View Answer
B
Q2147: Which API function creates a new process and optionally sets environment block?
- A: ExitProcess()
- B: CreateProcess()
- C: TerminateProcess()
- D: GetEnvironmentVariable()
View Answer
B
Q2148: Environment Block strings are used to store process ______ information.
- A: System
- B: Environment
- C: Memory
- D: Execution
View Answer
C
Q2149: If the process does not have PROCESS_QUERY_INFORMATION right, what happens when GetEnvironmentVariable() is called?
- A: Returns error
- B: Returns value
- C: Deletes variable
- D: Modifies variable
View Answer
A
Q2150: Which function returns a DWORD value representing length of environment variable string?
- A: GetEnvironmentVariable()
- B: SetEnvironmentVariable()
- C: CreateProcess()
- D: TerminateProcess()
View Answer
A