System Programming MCQs with Answers
Practice important System Programming MCQs with answers and explanations.
Chapter: 90
Q1901:
When using lpCommandLine, what is the first token considered?
A. Command string
B. Program image name
C. Function name
D. Windows path
Correct Answer:
B
Chapter: 90
Q1902:
What separates tokens in the lpCommandLine string?
A. Tabs
B. Spaces
C. Commas
D. Semicolons
Correct Answer:
B
Chapter: 90
Q1903:
If the program image name does not include a path, which is the first location searched?
A. Windows directory
B. Current directory
C. Directory of current process image
D. System32 directory
Correct Answer:
C
Chapter: 90
Q1904:
Which directory is searched second if the path is not in the image name?
A. Windows directory
B. Environment PATH directory
C. Current directory
D. Temporary files directory
Correct Answer:
C
Chapter: 90
Q1905:
The function GetSystemDirectory() is used to retrieve the ______.
A. Temporary directory
B. System directory
C. Program path
D. Executable filename
Correct Answer:
B
Chapter: 90
Q1906:
Which Windows function retrieves the Windows directory?
A. GetCommandLine()
B. GetTempPath()
C. GetWindowsDirectory()
D. GetDirEnv()
Correct Answer:
C
Chapter: 90
Q1907:
Environment variable PATH is used in the ______ for locating executable image.
A. Windows booting
B. process path search
C. search sequence
D. user profile
Correct Answer:
C
Chapter: 90
Q1908:
What is used in Windows to obtain the command line of the current process?
A. GetEnvironmentStrings()
B. GetCommandLine()
C. GetStartupInfo()
D. GetSystemCommand()
Correct Answer:
B
Chapter: 90
Q1909:
The command line can be changed by a program.
A. A
B. B
Correct Answer:
A
Chapter: 90
Q1910:
It is recommended to change the command line directly.
A. A
B. B
Correct Answer:
B
Chapter: 90
Q1911:
Programs should modify a ______ of the command line if needed.
A. new process
B. copy
C. segment
D. binary
Correct Answer:
B
Chapter: 90
Q1912:
lpApplicationName allows ______ path or drive to be used.
A. only network
B. current
C. full
D. temporary
Correct Answer:
B
Chapter: 90
Q1913:
If both lpApplicationName and lpCommandLine are NULL, the process will still start normally.
A. A
B. B
Correct Answer:
B
Chapter: 90
Q1914:
lpCommandLine provides a string where tokens are delimited by ______.
A. spaces
B. commas
C. quotes
D. colons
Correct Answer:
A
Chapter: 90
Q1915:
The Windows API that returns the full command line string is ______.
A. GetCommandString()
B. GetProcessCommand()
C. GetCommandLine()
D. FetchCmdLine()
Correct Answer:
C
Chapter: 90
Q1916:
Which parameter can be set to NULL when lpCommandLine contains the image name?
A. lpCommandLine
B. lpStartupInfo
C. lpApplicationName
D. lpEnvironment
Correct Answer:
C
Chapter: 90
Q1917:
To locate the program image, Windows may search directories listed in ______.
A. System.ini
B. Registry
C. Path Environment variable
D. User profile path
Correct Answer:
C
Chapter: 90
Q1918:
The command line passed using lpCommandLine is considered constant.
A. A
B. B
Correct Answer:
B
Chapter: 90
Q1919:
lpApplicationName must contain the file extension such as .EXE or .BAT.
A. A
B. B
Correct Answer:
A
Chapter: 90
Q1920:
When lpCommandLine is used, the first token must be the ______.
A. command type
B. environment variable
C. image name
D. startup info
Correct Answer:
C