Chapter 11 (MS-Windows Programming) – Assessment
True-False
Please indicate whether each statement is True (T) or False (F).
1. A application programming interface (API) includes functions, data types and constants.
2. The /SUBSYSTEM:CONSOLE option is required when linking Win32 console applications.
3. The HANDLE data type in the Win32 API is a 16-bit integer.
4. The LPSTR data type in the Win32 API is a 32-bit pointer to a character string.
5. A Win32 console HANDLE is required when reading and writing files.
6. The Win32 ReadConsoleInput function reads character input from the console buffer, but does
not remove the characters from the buffer.
7. When requesting single-character input, you must call SetConsoleMode to alter the console flag
settings.
8. The WriteString procedure in the Irvine32 library uses the Win32 function named WriteConsole
to generate console output.
9. The COORD structure defined in MS-Windows specifies X and Y screen coordinates in pixel
coordinates.
10. If you want to open an existing file, you must call the Win32 OpenFile function.
11. The CREATE_NEW constant can be passed to the creationDisposition parameter in the
CreateFile function.
12. When you call the ReadFile function, you must pass a pointer to a string containing the filename.
13. The SetFilePointer function permits you to start reading from any point in a file.
14. The SetConsoleWindowInfo function lets you control the size and position of the console
window.
15. The SetConsoleTextAttribute function can be used to change the color of text that has already
been written to the screen buffer.