System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 24
Q501:
Security attributes in CopyHardLink API apply to
A. the existing file
B. the original file
C. the new file
D. both files
Correct Answer:
C
Chapter: 24
Q502:
The function DeleteFile(LPCTSTR lpFileName) deletes file from _______.
A. memory
B. clipboard
C. path specified
D. directory root
Correct Answer:
C
Chapter: 24
Q503:
MoveFileEx accepts _______ parameters.
A. 2
B. 3
C. 4
D. 5
Correct Answer:
B
Chapter: 24
Q504:
The second parameter in MoveFile API specifies
A. the destination path
B. the source path
C. the overwrite flag
D. the file size
Correct Answer:
A
Chapter: 24
Q505:
The MoveFile function can be used to move
A. files only
B. directories only
C. files and directories
D. temporary files
Correct Answer:
A
Chapter: 24
Q506:
CopyFile overwrites the existing file if
A. bFailIfExists is true
B. bFailIfExists is false
C. bFailIfExists is NULL
D. bFailIfExists is undefined
Correct Answer:
B
Chapter: 24
Q507:
The function CopyFile requires which of the following?
A. Source and destination paths only
B. Destination path and overwrite flag
C. Only source path
D. Source path, destination path, and overwrite flag
Correct Answer:
D
Chapter: 24
Q508:
The API used to move files that already exist at destination is
A. MoveFile
B. MoveFileEx
C. DeleteFile
D. CopyHardLink
Correct Answer:
B
Chapter: 24
Q509:
The function CopyHardLink creates a hard link between
A. networked files
B. remote systems
C. local files on same volume
D. removable drives
Correct Answer:
C
Chapter: 24
Q510:
MoveFileEx() is an extended version of which function?
A. CopyFile
B. MoveFile
C. DeleteFile
D. TransferFile
Correct Answer:
B
Chapter: 24
Q511:
Both source and destination files must reside on the same volume when creating
A. a soft link
B. a hard link
C. a junction
D. an alias
Correct Answer:
B
Chapter: 24
Q512:
If MoveFileEx is not used, MoveFile will
A. fail silently
B. fail if file exists
C. overwrite automatically
D. rename file
Correct Answer:
B
Chapter: 24
Q513:
Windows provides functions for file and directory _______.
A. management
B. creation
C. encryption
D. visualization
Correct Answer:
A
Chapter: 24
Q514:
CopyHardLink accepts _______ parameters.
A. one
B. two
C. three
D. four
Correct Answer:
C
Chapter: 24
Q515:
DeleteFile will return FALSE if
A. the file does not exist
B. the file exists
C. the file is read-only
D. the file is in clipboard
Correct Answer:
A
Chapter: 24
Q516:
File management in Windows is handled by
A. Control Panel
B. File Explorer
C. APIs
D. Command Prompt
Correct Answer:
C
Chapter: 24
Q517:
The purpose of the BOOL return type in APIs like DeleteFile is to
A. return error code
B. return pointer
C. indicate success/failure
D. handle strings
Correct Answer:
C
Chapter: 24
Q518:
Windows API function to move and overwrite a directory is
A. MoveFile
B. DeleteFile
C. MoveFileEx
D. CopyFile
Correct Answer:
C
Chapter: 24
Q519:
The CopyFile API can be used to
A. copy memory
B. copy registry keys
C. copy files between locations
D. copy folder permissions
Correct Answer:
C
Chapter: 24
Q520:
Windows MoveFileEx API can be used to
A. move folders only
B. move files only
C. move both files and folders
D. move only hidden files
Correct Answer:
C