System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 102
Q2261:
Which function converts FILETIME to SYSTEMTIME?
A. FileTimeToSystemTime()
B. GetVersionEx()
C. CreateProcess()
D. SkipArg()
Correct Answer:
A
Chapter: 102
Q2262:
If argc <= 1 or SkipArg returns NULL, what happens?
A. Program continues
B. Reports usage error and exits
C. Starts default process
D. Waits for input
Correct Answer:
B
Chapter: 102
Q2263:
Which API checks the OS version?
A. GetVersionEx()
B. CreateProcess()
C. GetCommandLine()
D. SkipArg()
Correct Answer:
A
Chapter: 102
Q2264:
What priority is given to the created process?
A. NORMAL_PRIORITY_CLASS
B. HIGH_PRIORITY_CLASS
C. REALTIME_PRIORITY_CLASS
D. IDLE_PRIORITY_CLASS
Correct Answer:
A
Chapter: 102
Q2265:
What does the elapsedTime variable represent?
A. Difference between exit and creation times
B. Sum of user and kernel time
C. Total CPU idle time
D. Memory usage
Correct Answer:
A
Chapter: 102
Q2266:
Which two handles are closed at the end?
A. Process and thread handles
B. Process handle only
C. Thread handle only
D. No handles closed
Correct Answer:
A
Chapter: 102
Q2267:
What happens if the platform ID is not VER_PLATFORM_WIN32_NT?
A. Program exits with error
B. Continues normally
C. Shows warning
D. Skips execution
Correct Answer:
A
Chapter: 102
Q2268:
_tprintf() in this program is used to ____.
A. Print formatted output
B. Start process
C. Get OS version
D. Convert time
Correct Answer:
A
Chapter: 102
Q2269:
The code example is mainly about measuring ____.
A. Process execution times
B. Memory usage
C. Network speed
D. Disk I/O
Correct Answer:
A
Chapter: 102
Q2270:
ReportError() is called to ____.
A. Print error and optionally exit
B. Log information
C. Start process
D. Convert time
Correct Answer:
A
Chapter: 102
Q2271:
User time is ____.
A. Time spent in user mode
B. Time spent in kernel mode
C. Total system time
D. Idle time
Correct Answer:
A
Chapter: 102
Q2272:
Kernel time refers to ____.
A. Time spent in kernel mode
B. Time spent in user mode
C. Elapsed time
D. Idle CPU time
Correct Answer:
A
Chapter: 102
Q2273:
Elapsed time is calculated as ____.
A. Exit time minus create time
B. Create time minus exit time
C. User time minus kernel time
D. Kernel time minus user time
Correct Answer:
A
Chapter: 102
Q2274:
The command line arguments start from ____.
A. After the executable name
B. First token
C. Second token
D. Last token
Correct Answer:
A
Chapter: 102
Q2275:
The program uses union to handle ____.
A. File time arithmetic
B. Process priority
C. Thread information
D. Memory management
Correct Answer:
A
Chapter: 102
Q2276:
SkipArg() returns the command line after ____.
A. Executable name
B. First argument
C. Last argument
D. Process ID
Correct Answer:
A
Chapter: 102
Q2277:
The STARTUPINFO structure contains ____.
A. Process startup info
B. Execution times
C. OS version info
D. Thread ID
Correct Answer:
A
Chapter: 102
Q2278:
Which header file is included in the code?
A. Everything.h
B. Windows.h
C. Stdlib.h
D. Tchar.h
Correct Answer:
A
Chapter: 103
Q2279:
Terminating another process is problematic because the terminating process does not get a chance to _______.
A. release resources
B. raise exception
C. kill other processes
D. close handles
Correct Answer:
A
Chapter: 103
Q2280:
Console control events allow sending a message from one process to _______.
A. the same process
B. another process
C. the OS kernel
D. the user
Correct Answer:
A