System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2231: The time values returned by GetProcessTimes() are stored in ______.
- A: FILETIME
- B: SYSTEMTIME
- C: TIMEVAL
- D: TIMESTAMP
View Answer
A
Q2232: Elapsed time calculation involves which two time values?
- A: Kernel time and user time
- B: Creation time and exit time
- C: User time and exit time
- D: Kernel time and creation time
View Answer
B
Q2233: GetProcessTimes() can be used on processes that are still running.
- A: Yes
- B: No
- C: Only suspended processes
- D: Only terminated processes
View Answer
A
Q2234: The function that provides similar timing info for threads is called ______.
- A: GetThreadTime()
- B: GetThreadTimes()
- C: GetProcessTime()
- D: GetThreadInfo()
View Answer
A
Q2235: Which Windows API function retrieves the command line as a single string?
- A: GetCommandLine()
- B: GetProcessTimes()
- C: CreateProcess()
- D: WaitForSingleObject()
View Answer
A
Q2236: The function used to skip past the executable name in the command line is called ______.
- A: SkipArg()
- B: SkipExe()
- C: SkipCmd()
- D: SkipToken()
View Answer
A
Q2237: The Windows API structure used to hold process startup parameters is called ______.
- A: PROCESS_INFORMATION
- B: STARTUPINFO
- C: OSVERSIONINFO
- D: FILETIME
View Answer
B
Q2238: The Windows API structure that contains information about a process and its primary thread is called?
- A: STARTUPINFO
- B: PROCESS_INFORMATION
- C: OSVERSIONINFO
- D: FILETIME
View Answer
B
Q2239: What is the purpose of CreateProcess() in the provided code?
- A: To create a new thread
- B: To create and start a new process
- C: To get process execution times
- D: To close process handles
View Answer
B
Q2240: Which priority class is used to run the process in the example?
- A: HIGH_PRIORITY_CLASS
- B: IDLE_PRIORITY_CLASS
- C: NORMAL_PRIORITY_CLASS
- D: REALTIME_PRIORITY_CLASS
View Answer
C