Published: September 10, 2008
By Richard G. Baldwin
File: Allegro00150PracticeTest
1. True or False: There is no minimum width for an Allegro graphics window running under Windows.
2. True or False: There is a minimum width for an Allegro graphics window running under Windows.
3. True or False: When loading a truecolor image into a memory buffer, there is no required order in which you must set the graphics mode and call the load_bitmap function (or call set_color_conversion) to load the image.
4. True or False: When loading an image into a memory buffer, if the file contains a truecolor image, you must set the video mode (or call set_color_conversion) before loading it.
5. True or False: The function named get_clip_rect can be called to determine the coordinates of the diagonal corners of the current clip rectangle for an image.
6. True or False: The function named get_clip_rect can be called to determine the coordinates of the upper-left corner along with the width and the height of the current clip rectangle for an image.
7. True or False: When you call the function named get_clip_rect, among other parameters, you must pass the names of four variables of type int. The coordinate values for the diagonal corners will be deposited into these four variables.
8. True or False: When you call the function named get_clip_rect, among other parameters, you must pass the addresses of four variables of type int. The coordinate values for the diagonal corners will be deposited into these four variables.
9. True or False: Assuming that the clip rectangle of an image has not been modified since it was loaded into memory, the function named get_clip_rect can be called to get information that will allow you to compute the width and height of an image.
10. True or False: The function named get_clip_rect is very useful for displaying an image but it cannot be used to compute the size of an image.
11. True or False: If the variable named width in the statement shown below is type float, the result of the computation will always be evenly divisible by 4.
windowWidth = (width/4)*4 + 4; |
12. True or False: If the variable named width in the statement shown below is type int, the result of the computation will always be evenly divisible by 4.
windowWidth = (width/4)*4 + 4; |
13. True or False: The sprintf function provides a convenient mechanism for converting numeric data to a text string for display in an Allegro graphics window.
14. True or False: The scanf function provides a convenient mechanism for converting numeric data to a text string for display in an Allegro graphics window.
Copyright 2008, Richard G. Baldwin.
Reproduction in whole or in part in any form or medium
without express written permission from Richard Baldwin is prohibited.
Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
Copyright 2008, Richard G. Baldwin. Reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.
Richard Baldwin is a college professor (at Austin Community College in Austin, TX) and private consultant whose primary focus is a combination of Java, C#, and XML. In addition to the many platform and/or language independent benefits of Java and C# applications, he believes that a combination of Java, C#, and XML will become the primary driving force in the delivery of structured information on the Web.Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
-end-