Published: September 7, 2008
By Richard G. Baldwin
File: Allegro00115PracticeTest
1. True or False: The clear_keybuf function can be called to store the character string "clear" in the keyboard buffer.
2. True or False: A call to the makecol function with parameters of 0,0,0 returns the RGB value for black.
3. True or False: Programs that you write using Allegro have access to an array of true/false data (named key) where the value in each element in the array represents the pressed/non-pressed state of one key on the keyboard. If the key is pressed, the element contains a true value. Otherwise, it contains a false value.
4. True or False: Programs that you write using Allegro have access to an array of true/false data (named keyboard) where the value in each element in the array represents the pressed/non-pressed state of one key on the keyboard. If the key is pressed, the element contains a false value. Otherwise, it contains a true value.
5. True or False: The numeric symbolic constant named key_down is the index for an element in an array named key that contains a value representing the pressed/non-pressed state of the down-arrow key.
6. True or False: The symbolic constant named key_down is true whenever any key on the keyboard is pressed down.
7. True or False: The code shown below draws "HELLO WORLD" in yellow text at the location specified by the x and y parameters.
textout_ex(screen, font, "HELLO WORLD", x, y, makecol(255,255,0), -1 ); |
8. True or False: The code shown below draws "HELLO WORLD" in red text at the location specified by the x and y parameters.
textout_ex(screen, font, "HELLO WORLD", x, y, makecol(255,255,0), -1 ); |
9. True or False: The call to the rest function shown below inserts a ten-millisecond delay in the execution of the program.
rest(10); |
10. True or False: The call to the rest function shown below inserts a ten-second delay in the execution of the program.
rest(10); |
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-