System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 37
Q841:
lpPrefixString in GetTempFileName() represents a ________ string.
A. null-terminated
B. binary
C. hexadecimal
D. Unicode
Correct Answer:
A
Chapter: 37
Q842:
The first ________ characters of lpPrefixString are used as the prefix in the filename.
A. 3
B. 4
C. 5
D. 6
Correct Answer:
A
Chapter: 37
Q843:
uUnique parameter in GetTempFileName() is of type ________.
A. unsigned integer
B. integer
C. string
D. pointer
Correct Answer:
A
Chapter: 37
Q844:
lpTempFileName in GetTempFileName() is a pointer to a ________ that receives the temporary filename.
A. buffer
B. file
C. handle
D. pointer
Correct Answer:
A
Chapter: 37
Q845:
What type of value does GetTempFileName() return?
A. UINT
B. BOOL
C. DWORD
D. HANDLE
Correct Answer:
A
Chapter: 37
Q846:
The unique number uUnique helps to ________ the temporary filename.
A. ensure uniqueness
B. define file size
C. define file permissions
D. specify file path
Correct Answer:
A
Chapter: 37
Q847:
In GetTempFileName(), the prefix string is used at the ________ of the temporary filename.
A. beginning
B. middle
C. end
D. after extension
Correct Answer:
A
Chapter: 37
Q848:
Temporary files are primarily used to store ________.
A. intermediate results
B. final output
C. system logs
D. configuration data
Correct Answer:
A
Chapter: 37
Q849:
Which of the following is NOT a parameter of GetTempFileName()?
A. lpPathName
B. lpPrefixString
C. uUnique
D. lpFileSize
Correct Answer:
D
Chapter: 37
Q850:
The pointer lpTempFileName must point to a buffer large enough to hold ________.
A. the temporary filename
B. the full path
C. only the prefix
D. the file extension
Correct Answer:
A
Chapter: 38
Q851:
The application lsW uses the option -l to _________.
A. list attributes of files
B. traverse directories
C. compile code
D. delete files
Correct Answer:
A
Chapter: 38
Q852:
The option -R in lsW is used for ________.
A. recursive traversal through subfolders
B. file deletion
C. listing files
D. renaming files
Correct Answer:
A
Chapter: 38
Q853:
The lsW program works only with ________ pathname.
A. relative
B. absolute
C. virtual
D. root
Correct Answer:
A
Chapter: 38
Q854:
In the sample program, BOOL TraverseDirectory() likely returns a value indicating ________.
A. success or failure
B. number of files found
C. file size
D. directory depth
Correct Answer:
A
Chapter: 38
Q855:
The function DWORD FileType() probably returns the ________.
A. type of file
B. creation date
C. file size
D. file attributes
Correct Answer:
A
Chapter: 38
Q856:
ProcessItem() function in the sample code processes a(n) ________.
A. file or directory
B. error code
C. file handle
D. file name
Correct Answer:
A
Chapter: 38
Q857:
_tmain function in the code is the ________.
A. entry point
B. main function
C. library
D. callable API
Correct Answer:
B
Chapter: 38
Q858:
Flags[MAX_OPTIONS] array is used to store ________.
A. option switches
B. file names
C. file sizes
D. file attributes
Correct Answer:
A
Chapter: 38
Q859:
The variable searchPattern holds the ________.
A. filename or wildcard pattern
B. current directory
C. path length
D. file attributes
Correct Answer:
A
Chapter: 38
Q860:
In the code, fileIndex is assigned the result of the function ________.
A. Options
B. TraverseDirectory
C. FileType
D. ProcessItem
Correct Answer:
A