Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 97
Q2141:
CREATE_HANDLE access right allows a process to ______.
A. Create handles
B. Terminate process
C. Query process info
D. Set environment variables
Correct Answer: A
Chapter: 97
Q2142:
Environment variables are stored as strings of the form ______.
A. Name=Value
B. Name:Value
C. Name-Value
D. Name/Value
Correct Answer: A
Chapter: 97
Q2143:
When a new environment variable is created, the variable name must not contain ______.
A. Spaces
B. Equals sign
C. Underscores
D. Dashes
Correct Answer: B
Chapter: 97
Q2144:
To delete an environment variable, set its value to ______ in SetEnvironmentVariable().
A. Empty string
B. NULL
C. DELETE
Correct Answer: B
Chapter: 97
Q2145:
SetEnvironmentVariable() requires which two parameters?
A. lpName and lpValue
B. lpBuffer and nSize
C. hProcess and uExitCode
D. hHandle and timeout
Correct Answer: A
Chapter: 97
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
Correct Answer: B
Chapter: 97
Q2147:
Which API function creates a new process and optionally sets environment block?
A. ExitProcess()
B. CreateProcess()
C. TerminateProcess()
D. GetEnvironmentVariable()
Correct Answer: B
Chapter: 97
Q2148:
Environment Block strings are used to store process ______ information.
A. System
B. Environment
C. Memory
D. Execution
Correct Answer: C
Chapter: 97
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
Correct Answer: A
Chapter: 97
Q2150:
Which function returns a DWORD value representing length of environment variable string?
A. GetEnvironmentVariable()
B. SetEnvironmentVariable()
C. CreateProcess()
D. TerminateProcess()
Correct Answer: A
Chapter: 97
Q2151:
The environment variable names are case ______.
A. Sensitive
B. Insensitive
C. Insensitive only on Windows
D. Sensitive only on Linux
Correct Answer: B
Chapter: 98
Q2152:
What is the purpose of the example program described?
A. Search a pattern in multiple files
B. Sort files
C. Delete files
D. Create files
Correct Answer: A
Chapter: 98
Q2153:
Which Windows feature does the example program use to search files concurrently?
A. Multitasking
B. Single-threading
C. Batch processing
D. Interrupt handling
Correct Answer: A
Chapter: 98
Q2154:
How does the program receive the pattern and filenames?
A. Command line
B. Configuration file
C. Graphical user interface
D. Environment variables
Correct Answer: A
Chapter: 98
Q2155:
What is specified as inheritable in the new process startup info?
A. Standard input file
B. Standard output file
C. Standard error file
D. Temporary file
Correct Answer: B
Chapter: 98
Q2156:
What synchronization method is used to wait for processes to finish?
A. Mutexes
B. Wait functions
C. Semaphores
D. Event objects
Correct Answer: B
Chapter: 98
Q2157:
What is the limit on the number of handles that wait functions can manage simultaneously?
A. 32
B. 64
C. 128
D. 256
Correct Answer: B
Chapter: 98
Q2158:
How does the program determine if a process found the search pattern?
A. Exit code
B. Standard output
C. Message box
D. Log file
Correct Answer: A
Chapter: 98
Q2159:
What does the program do immediately after the search ends?
A. Displays results one at a time
B. Deletes all files
C. Creates new files
D. Starts new search
Correct Answer: A
Chapter: 98
Q2160:
What header file is included in the example program?
A. <stdio.h>
B. <Everything.h>
C. <windows.h>
D. <process.h>
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now