Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 24
Q521:
The parameter dwFlags in MoveFileEx is used for
A. defining security settings
B. specifying move behavior
C. sending notifications
D. limiting file size
Correct Answer: B
Chapter: 24
Q522:
Deleting a file using DeleteFile requires
A. a path
B. a URL
C. a registry key
D. a driver name
Correct Answer: A
Chapter: 24
Q523:
CopyFile and MoveFile APIs belong to which OS?
A. Unix
B. Windows
C. Linux
D. MacOS
Correct Answer: B
Chapter: 24
Q524:
The Windows API function MoveFileEx handles
A. drive formatting
B. disk partitioning
C. file movement and overwriting
D. data encryption
Correct Answer: C
Chapter: 25
Q525:
Which function is used to create a directory in Windows?
A. CreateDir()
B. CreateDirectory()
C. NewFolder()
D. AddDirectory()
Correct Answer: B
Chapter: 25
Q526:
The API CreateDirectory takes how many parameters?
A. 1
B. 2
C. 3
D. 4
Correct Answer: B
Chapter: 25
Q527:
What does the second parameter of CreateDirectory represent?
A. Folder name
B. Security attributes
C. Directory path
D. Creation time
Correct Answer: B
Chapter: 25
Q528:
The path of the directory to be created is specified by
A. LPSECURITY_ATTRIBUTES
B. lpFolderName
C. lpPathName
D. lpDirectoryPath
Correct Answer: C
Chapter: 25
Q529:
Which function is used to delete a directory in Windows?
A. DeleteDir()
B. RemoveDirectory()
C. EraseDirectory()
D. DropDirectory()
Correct Answer: B
Chapter: 25
Q530:
The function RemoveDirectory requires
A. only path
B. security access level
C. path and permissions
D. buffer name
Correct Answer: A
Chapter: 25
Q531:
Which of the following is a valid Windows API for setting current working directory?
A. GetCurrentDirectory()
B. ResetCurrentDirectory()
C. SetCurrentDirectory()
D. MoveCurrentDirectory()
Correct Answer: C
Chapter: 25
Q532:
The function SetCurrentDirectory changes
A. the folder name
B. the directory permissions
C. the current working directory
D. the root directory
Correct Answer: C
Chapter: 25
Q533:
What does the function GetCurrentDirectory do?
A. Deletes directory
B. Creates directory
C. Returns current directory path
D. Copies directory path
Correct Answer: C
Chapter: 25
Q534:
To retrieve current directory, we use
A. GetDirectory()
B. GetPathName()
C. GetCurrentDirectory()
D. ReadDirectory()
Correct Answer: C
Chapter: 25
Q535:
GetCurrentDirectory requires which type of argument?
A. string length and string buffer
B. security access only
C. path only
D. numeric flag
Correct Answer: A
Chapter: 25
Q536:
Each process in Windows has its own
A. current directory
B. system path
C. drive root
D. environment path
Correct Answer: A
Chapter: 25
Q537:
The concept of current directory exists in
A. Windows only
B. Unix only
C. Windows and many OS
D. Mobile OS only
Correct Answer: C
Chapter: 25
Q538:
The directory path used in CreateDirectory must be passed as
A. a buffer
B. an integer
C. a pointer to string
D. a registry key
Correct Answer: C
Chapter: 25
Q539:
CreateDirectory() will fail if
A. the path is invalid
B. the directory already exists
C. the disk is full
D. all of the above
Correct Answer: D
Chapter: 25
Q540:
SetCurrentDirectory changes directory for
A. the entire system
B. all users
C. the current process
D. system32 folder
Correct Answer: C

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now