Skip to main content

System Programming MCQs with Answers

Practice important System Programming MCQs with answers and explanations.

Chapter: 17
Q381:
Windows supports which of the following besides generic data types?
A. Generic functions
B. Only Unicode
C. Only ASCII
D. Only macros
Correct Answer: A
Chapter: 17
Q382:
Which generic function is used instead of lstrcmp()?
A. _tcscmp()
B. _lstrcmp()
C. _tcscmpi()
D. _lstrcmpi()
Correct Answer: A
Chapter: 17
Q383:
Which generic function compares strings ignoring case?
A. _tcscmp()
B. _lstrcmp()
C. _tcscmpi()
D. _lstrcmpi()
Correct Answer: C
Chapter: 17
Q384:
Which function is used to convert characters to uppercase and works with Unicode?
A. CharLower()
B. CharUpper()
C. CharToUpper()
D. UpperChar()
Correct Answer: B
Chapter: 17
Q385:
The function IsCharAlphaNumeric() checks whether a character is _______.
A. Alphabetic only
B. Numeric only
C. Alphanumeric
D. Special character
Correct Answer: C
Chapter: 17
Q386:
Which function compares strings taking locale settings into account?
A. CompareText()
B. CompareString()
C. StringCompare()
D. LocaleCompare()
Correct Answer: B
Chapter: 17
Q387:
The generic version of main() function in Windows is written as _______.
A. int main(int argc, char *argv[])
B. int _tmain(int argc, LPTSTR argv[])
C. void main()
D. int _main(int argc, char *argv[])
Correct Answer: B
Chapter: 17
Q388:
Which header files must be included before the generic main() function?
A. stdio.h and stdlib.h
B. windows.h and tchar.h
C. string.h and ctype.h
D. tchar.h and stdio.h
Correct Answer: B
Chapter: 17
Q389:
Windows API functions often have two variants to support different character types. TextOut function variants are _______.
A. TextOutA and TextOutB
B. TextOutA and TextOutW
C. TextOut16 and TextOut32
D. TextOutW and TextOutX
Correct Answer: B
Chapter: 17
Q390:
The suffix 'A' in Windows API function names usually indicates _______.
A. Unicode version
B. ASCII version
C. Generic version
D. 32-bit version
Correct Answer: B
Chapter: 17
Q391:
The suffix 'W' in Windows API function names usually indicates _______.
A. Unicode version
B. ASCII version
C. Generic version
D. 16-bit version
Correct Answer: A
Chapter: 17
Q392:
Using generic data types and Unicode macros allows the compiler to _______.
A. Always choose ASCII version
B. Always choose Unicode version
C. Decide which API version to use
D. Ignore API version
Correct Answer: C
Chapter: 18
Q393:
One Unicode strategy where the code uses only 8-bit characters is called _______.
A. IgnoreUnicode
B. Use8bitonly
C. UseUnicodeonly
D. GenericCode
Correct Answer: B
Chapter: 18
Q394:
The strategy that uses data types like char or CHAR and standard library functions such as printf() is called _______.
A. Unicode Policy
B. IgnoreUnicode Policy
C. Generic Code Policy
D. Unicode and 8-bit Policy
Correct Answer: B
Chapter: 18
Q395:
Most Windows APIs cannot be used when _______.
A. Using Unicode
B. Using IgnoreUnicode Policy
C. Using Generic Code Policy
D. Using Unicode and 8-bit Policy
Correct Answer: B
Chapter: 18
Q396:
Which macro is used to switch between 8-bit and Unicode in generic code?
A. #define ASCII
B. #define UNICODE
C. #define _UNICODE
D. #define GENERIC
Correct Answer: B
Chapter: 18
Q397:
Generic code uses _______ to handle character encoding flexibly.
A. Only 8-bit data types
B. Generic functions and data types
C. Only Unicode functions
D. Only ASCII functions
Correct Answer: B
Chapter: 18
Q398:
Unicode Policy requires the use of _______ data types.
A. 8-bit characters
B. Char and CHAR
C. Wide characters
D. Generic characters
Correct Answer: C
Chapter: 18
Q399:
The Unicode and 8-bit Policy handles _______.
A. Only Unicode characters
B. Only 8-bit characters
C. Both Unicode and 8-bit characters
D. No characters
Correct Answer: C
Chapter: 18
Q400:
In the Unicode and 8-bit Policy, the choice of which encoding to use is made at _______.
A. Compile time
B. Runtime
C. Link time
D. Installation time
Correct Answer: B

Test Your Knowledge

Take a timed quiz on System Programming

🚀 Start Quiz Now