Computer Science 102 Quiz 3 Name____________________ 1. The modification to the function that was suggested last time for mapping pixel to world coordinates was: a. world_x = world_size_x * win_x / (win_size_x + 1) b. world_x = world_size_x * win_x / (win_size_x - 1) c. world_x = (win_size_x + 1) * win_x / (world_size_x) d. world_x = world_size_x * (win_size_x - 1) / win_x 2. The elements of a table of attribute types declared as shown are: static char *ac_attrs[] = { "position", /* Current location of aircraft */ "direction", /* Direction of travel */ "speed", /* Speed in NM/hr */ }; a. character strings b. ints c. character variables d. pointers to characters strings 3. The proper way to define the number of entries in a table such as this one is: a. #define NUM_ATTRS (sizeof(ac_attrs) / sizeof(char)) b. #define NUM_ATTRS (sizeof(ac_attrs[0]) / sizeof(char *)) c. #define NUM_ATTRS (sizeof(ac_attrs[0]) / sizeof(char)) d. #define NUM_ATTRS (sizeof(ac_attrs) / sizeof(char *)) 4. In the model description language we described in class a set of attribute values may be followed by: a. } b. an attribute type c. a or b d. end-of-file 5. In the model description language described in class, end-of-file can legally follow what token(s)? a. { b. } c. a collection of attribute d. any of the above values