Final Format最终的格式.ppt
文本预览下载声明
Instructor: Alexander Stoytchev /~alexs/classes/2009_Fall_185/ Final Exam Final Exam: Thursday Dec 17: 2:15- 4:15 pm Location: This room. The final is worth 25% of your grade. The best way to fail this class is to not show up. Final Format True/False (10 x 1p each = 10p) Fun Stuff ( 3 x 5p each = 15p) Short answers ( 5 x 3p each = 15p) Code Snippets ( 4 x 5p each = 20p) What is the output ( 3 x 5p each = 15p) Program 1 (15p) Program 2 (20p) Program 3 (20p) TOTAL (130p) Final Format You don’t need to get all 130 points to get an A 100 is a 100 You must get at least 65 points in order to pass this exam General Topics for the Final Everything since midterm2 Recursion Stuctures Strings Files Pointers General Topics for the Final Everything since midterm2 Recursion Stuctures Strihngs Files Pointers And everything before midterm2. No topic is off limits! How to Study for the Final Form a study group. (this will help you overcome your fear) Go back and look at my slides for this class. Go back and look at the sample programs that were demonstrated during the lectures. Programs you wrote during the labs. Homework problems (solve them again). Exercise. And get some sleep. Recursive Control Flow In Recursive calls methods can call themselves, but typically with different arguments each time Recursive Control Flow In Recursive calls methods can call themselves, but typically with different arguments each time Recursion: Fibonacci Numbers Fibonacci Sequence #includestdio.h #includestdlib.h int fib(int n) { int ret; if (n 2) { ret = 1; } else{ ret= fib(n-1) + fib(n-2); } return ret; } int main() { int i; for(i=0;i10;i++) printf(%d , fib(i)); system(pause); } Mathematical notation v.s. C code Execution Trace Mystery Recursion void mystery1(int a, int b) { if (a = b) { int m = (a + b) / 2; printf(“%d “, m); mystery1(a, m
显示全部