Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 106
Q2361:
Before reading a job record, FindProcessId() sets the file pointer using _______.
A. SetFilePointerEx()
B. SetFilePointer()
C. ReadFilePointer()
D. MoveFilePointer()
Correct Answer: B
Chapter: 106
Q2362:
To lock a specific record in the file, FindProcessId() uses _______.
A. LockFileEx()
B. LockFile()
C. UnlockFileEx()
D. UnlockFile()
Correct Answer: A
Chapter: 106
Q2363:
The size of each job record in the file is represented by the constant _______.
A. SJM_JOB
B. JOB_SIZE
C. RECORD_SIZE
D. FILE_SIZE
Correct Answer: A
Chapter: 106
Q2364:
What is the purpose of the variable 'fileSizeLow' in the function?
A. Stores high part of file size
B. Stores low part of file size
C. Stores total file size
D. Stores job number
Correct Answer: B
Chapter: 106
Q2365:
The function GetFileSizeEx() is used to obtain the _______.
A. Size of the file
B. Size of a job record
C. Number of jobs
D. Current file pointer position
Correct Answer: A
Chapter: 106
Q2366:
If GetJobMgtFileName() fails, FindProcessId() _______.
A. Returns 0
B. Throws exception
C. Returns -1
D. Continues execution
Correct Answer: A
Chapter: 106
Q2367:
The structure that stores job data read from the file is called _______.
A. JM_JOB
B. JobRecord
C. JobData
D. JobHandle
Correct Answer: A
Chapter: 106
Q2368:
Which argument of LockFileEx() specifies the size of the locked region?
A. regionStart.Offset
B. SJM_JOB
C. jobNumber
Correct Answer: B
Chapter: 106
Q2369:
What does ReadFile() do in the context of FindProcessId()?
A. Reads the entire job file
B. Reads the job record at current pointer
C. Reads job count
D. Reads process handle
Correct Answer: B
Chapter: 106
Q2370:
If ReadFile() fails, the function calls _______ to report the error.
A. ReportError()
B. LogError()
C. ExitProcess()
D. AbortProcess()
Correct Answer: A
Chapter: 106
Q2371:
The parameter 'jobNumber' in FindProcessId() indicates the _______.
A. Job ID
B. Process ID
C. Record number
D. File size
Correct Answer: C
Chapter: 106
Q2372:
What value does FindProcessId() return?
A. Process ID
B. Job Number
C. Exit code
D. File handle
Correct Answer: A
Chapter: 107
Q2373:
Windows job objects allow grouping of multiple _______.
A. threads
B. files
C. processes
D. memory blocks
Correct Answer: C
Chapter: 107
Q2374:
Which Windows API function is used to create a job object?
A. CreateProcess()
B. CreateJobObject()
C. OpenJobObject()
D. AssignProcessToJobObject()
Correct Answer: B
Chapter: 107
Q2375:
Once a job object is created, the function used to assign a process to it is _______.
A. CreateProcess()
B. AssignProcessToJobObject()
C. SetInformationJobObject()
D. CloseHandle()
Correct Answer: B
Chapter: 107
Q2376:
The function used to open an existing named job object is _______.
A. CreateJobObject()
B. OpenJobObject()
C. CloseHandle()
D. SetInformationJobObject()
Correct Answer: B
Chapter: 107
Q2377:
To close a job object handle, the function _______ is used.
A. CloseJobObject()
B. CloseHandle()
C. ReleaseJobObject()
D. DestroyHandle()
Correct Answer: B
Chapter: 107
Q2378:
Child processes of a process assigned to a job object are automatically assigned to the same job object unless the _______ flag is used.
A. CREATE_BREAKAWAY_FROM_JOB
B. CREATE_NEW_PROCESS_GROUP
C. CREATE_SUSPENDED
D. CREATE_NO_WINDOW
Correct Answer: A
Chapter: 107
Q2379:
SetInformationJobObject() is used to _______.
A. Create a job object
B. Assign a process to job object
C. Set resource limits on job object
D. Close a job object
Correct Answer: C
Chapter: 107
Q2380:
Which parameter of SetInformationJobObject() specifies the limit type like working set size or priority?
A. hJob
B. lpJobObjectInformation
C. JobObjectInformationClass
D. cbJobObjectInformationLength
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now