System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q731: What does the lpFileSize parameter of GetFileSizeEx represent?
- A: File name
- B: File pointer
- C: File handle
- D: Pointer to LARGE_INTEGER
View Answer
D
Q732: Which of the following allows direct resizing of a file in Windows?
- A: GetFileSizeEx()
- B: SetFileAttributes()
- C: SetEndOfFileEx()
- D: WriteFile()
View Answer
C
Q733: Moving the file pointer from start to end manually can give you the
- A: file name
- B: file attributes
- C: file size
- D: file extension
View Answer
C
Q734: What is the return type of GetFileSizeEx()?
- A: INT
- B: BOOL
- C: HANDLE
- D: VOID
View Answer
B
Q735: To get a valid result from GetFileSizeEx, the file must be
- A: closed
- B: empty
- C: readable
- D: and have FILE_READ_ATTRIBUTES
View Answer
C
Q736: The method of moving file pointer from start to end is used to
- A: detect file type
- B: compress file
- C: measure file size
- D: set file attributes
View Answer
C
Q737: To allow file size growth in advance, which function is used?
- A: SetFileLength()
- B: WriteFile()
- C: SetEndOfFileEx()
- D: SeekToEnd()
View Answer
C
Q738: Reducing file size using SetEndOfFileEx may result in
- A: appending data
- B: creating new file
- C: truncating data
- D: duplicating file
View Answer
C
Q739: A file pointer after opening a file using CreateFile() points to
- A: the last byte of file
- B: beginning of file
- C: middle of file
- D: end of file
View Answer
B
Q740: In file pointer method, file size is calculated by
- A: subtracting end and start addresses
- B: counting file handles
- C: calling malloc()
- D: measuring bytes copied
View Answer
A