Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 100
Q2221:
The GetProcessTimes() function requires a ______ as its first parameter.
A. Process ID
B. Process handle
C. Thread handle
D. Window handle
Correct Answer: B
Chapter: 100
Q2222:
GetProcessTimes() returns time information in the form of ______.
A. DWORD
B. FILETIME
C. SYSTEMTIME
D. TIMESTAMP
Correct Answer: B
Chapter: 100
Q2223:
The FILETIME structure is a ______-bit value.
A. 32
B. 64
C. 128
D. 16
Correct Answer: B
Chapter: 100
Q2224:
To calculate the elapsed time of a process, you subtract ______ from ______.
A. Creation time from kernel time
B. Exit time from creation time
C. User time from kernel time
D. Exit time from user time
Correct Answer: B
Chapter: 100
Q2225:
GetThreadTime() requires a ______ handle as a parameter.
A. Process
B. Thread
C. Window
D. File
Correct Answer: B
Chapter: 100
Q2226:
The process handle passed to GetProcessTimes() can be for the current process or a ______.
A. Suspended process
B. Running process
C. Terminated process
D. Idle process
Correct Answer: C
Chapter: 100
Q2227:
The GetProcessTimes() function returns times related to ______.
A. Kernel mode and user mode execution
B. File access and network usage
C. Memory allocation and paging
D. Disk I/O and interrupt handling
Correct Answer: A
Chapter: 100
Q2228:
GetThreadTime() provides timing information about a ______.
A. Process
B. Thread
C. File
D. Device
Correct Answer: B
Chapter: 100
Q2229:
GetProcessTimes() returns all EXCEPT:
A. Creation time
B. Exit time
C. Kernel time
D. CPU temperature
Correct Answer: D
Chapter: 100
Q2230:
To use GetProcessTimes(), the application must provide a valid ______.
A. Process ID
B. Process handle
C. Thread ID
D. Thread handle
Correct Answer: B
Chapter: 100
Q2231:
The time values returned by GetProcessTimes() are stored in ______.
A. FILETIME
B. SYSTEMTIME
C. TIMEVAL
D. TIMESTAMP
Correct Answer: A
Chapter: 100
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
Correct Answer: B
Chapter: 100
Q2233:
GetProcessTimes() can be used on processes that are still running.
A. Yes
B. No
C. Only suspended processes
D. Only terminated processes
Correct Answer: A
Chapter: 100
Q2234:
The function that provides similar timing info for threads is called ______.
A. GetThreadTime()
B. GetThreadTimes()
C. GetProcessTime()
D. GetThreadInfo()
Correct Answer: A
Chapter: 101
Q2235:
Which Windows API function retrieves the command line as a single string?
A. GetCommandLine()
B. GetProcessTimes()
C. CreateProcess()
D. WaitForSingleObject()
Correct Answer: A
Chapter: 101
Q2236:
The function used to skip past the executable name in the command line is called ______.
A. SkipArg()
B. SkipExe()
C. SkipCmd()
D. SkipToken()
Correct Answer: A
Chapter: 101
Q2237:
The Windows API structure used to hold process startup parameters is called ______.
A. PROCESS_INFORMATION
B. STARTUPINFO
C. OSVERSIONINFO
D. FILETIME
Correct Answer: B
Chapter: 101
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
Correct Answer: B
Chapter: 101
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
Correct Answer: B
Chapter: 101
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
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now