System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Multiple Choice Questions
Q541: Removing a directory using RemoveDirectory will fail if
- A: the directory contains files
- B: the path is null
- C: the folder is in use
- D: all of the above
View Answer
D
Q542: SetCurrentDirectory and GetCurrentDirectory are used for
- A: creating new folders
- B: moving folders
- C: managing current working directory
- D: encrypting folders
View Answer
C
Q543: Which function allows retrieval of the process's current directory path?
- A: SetCurrentDirectory
- B: GetPathName
- C: GetCurrentDirectory
- D: RemoveDirectory
View Answer
C
Q544: CreateDirectory and RemoveDirectory both require
- A: security attributes
- B: path names
- C: function names
- D: log files
View Answer
B
Q545: Directory path is passed in CreateDirectory using
- A: LPSTR lpFileName
- B: LPCTSTR lpPathName
- C: int path
- D: DWORD lpBuffer
View Answer
B
Q546: The parameter lpSecurityAttributes in CreateDirectory is used to
- A: define folder name
- B: set user permissions
- C: specify timestamps
- D: define buffer size
View Answer
B
Q547: Which function among the following sets the directory where process is currently operating?
- A: GetCurrentDirectory
- B: SetWorkingPath
- C: SetCurrentDirectory
- D: CreateDirectory
View Answer
C
Q548: The return type of CreateDirectory is
- A: BOOL
- B: DWORD
- C: INT
- D: CHAR
View Answer
A
Q549: To delete an empty directory in Windows, you should use
- A: RemoveDirectory
- B: DeleteFolder
- C: DeleteDirectory
- D: EraseDir
View Answer
A
Q550: Removing a non-empty directory with RemoveDirectory will
- A: result in TRUE
- B: throw an exception
- C: fail
- D: return NULL
View Answer
C