Computer Science 215 Quiz A Name ______________________ 1. Which of the following best characterizes what happens when a program attempts to invoke a function that is defined in another module but for which no prototype definition is supplied: (suppose main.c invokes function adder() in adder.c and the compile command is: gcc -g main.c adder.c) a. it will cause a syntax error b. it will cause an error at link at compile time because the time because the linker won't function name is not defined be able to find adder() c. it will always work fine d. it will only work if adder() returns int and its parameters are of the correct type 2. In the design proposed last class for the ray tracer a. structures of type sphere_t b. structures of type obj_t were linked via a pointer were linked via a pointer called "next". called "next" c. the pointer "next" was used to d. the pointer "next" was used point from obj_t to sphere_t to point from sphere_t to obj_t 3. Suppose "funptr" is a properly declared pointer to functions having two int parameters and returning int. The correct way to cause it to point to "adder" is: a. funptr = adder; b. funptr = &adder; c. *funptr = adder; d. funptr = adder(); 4. After the pointer is correctly initialized, the proper way to invoke the function adder through the pointer is: a. s = funptr(3, 4); b. s = (*funptr(3, 4)); c. s = (*funptr)(3, 4); d. s = *(funptr)(3,4); 5. Which of the following is the best approximation of the actual score of the Clemson FSU game saturday. The objective function to be minimized is: | pred(clem) - actual(clem)| + |pred(fsu) - actual(fsu)| a. Clemson 45 b. Clemson 14 FSU 14 FSU 10 c. FSU 17 d. FSU 38 Clemson 6 Clemson 6