System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q2361: Before reading a job record, FindProcessId() sets the file pointer using _______.
- A: SetFilePointerEx()
- B: SetFilePointer()
- C: ReadFilePointer()
- D: MoveFilePointer()
View Answer
B
Q2362: To lock a specific record in the file, FindProcessId() uses _______.
- A: LockFileEx()
- B: LockFile()
- C: UnlockFileEx()
- D: UnlockFile()
View Answer
A
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
View Answer
A
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
View Answer
B
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
View Answer
A
Q2366: If GetJobMgtFileName() fails, FindProcessId() _______.
- A: Returns 0
- B: Throws exception
- C: Returns -1
- D: Continues execution
View Answer
A
Q2367: The structure that stores job data read from the file is called _______.
- A: JM_JOB
- B: JobRecord
- C: JobData
- D: JobHandle
View Answer
A
Q2368: Which argument of LockFileEx() specifies the size of the locked region?
- A: regionStart.Offset
- B: SJM_JOB
- C: jobNumber
- D: 0
View Answer
B
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
View Answer
B
Q2370: If ReadFile() fails, the function calls _______ to report the error.
- A: ReportError()
- B: LogError()
- C: ExitProcess()
- D: AbortProcess()
View Answer
A