Pre-lab 3 questions
Name:
Cnet ID:
Lab start time:
Note: There may be more than one answer. Make sure you leave
all that apply
1. Label each line with the color it will produce given RGB colors from 0-255.
a) 255, 0, 0
b) 0, 255, 0
c) 0, 0, 255
d) 0, 0, 0
e) 255, 255, 255
2. png compresses the file without losing any information. This is called:
(delete the incorrect one)
a) lossless
b) lossy
3. What are the common uses of #define?
(Remove any answers that are not)
a) making sure a .h file is not read twice during a single compilation pass.
b) create new types
c) defining constants to use throughout the program
d) turning on and off debugging statements
e) writing spaghetti code
4. Which are true statements about statically-allocated arrays (e.g. int x[3][4])?
(Remove any answers that are not)
a) These may be safely returned from function calls.
b) Passing this array into a function will pass the address of the beginning
element, not copy the entire array. Therefore, any changes made inside the
function will be present after the function ends.
c) You can change the size of an array if you wish by redeclaring it.
d) Arrays and pointers are very related.