Exam Information
Final Exam
The final exam has been scheduled for April 26, 9:30am to noon.
The final is worth 40% of your final grade. Like the midterm, you will not be allowed to bring an aid sheet of your own, but the standard aid sheet will be available.
The final will be about twice the length of the midterm. It will be out of 50 (recall the midterm was /25). There will be ten sections on the exam, each worth five marks. The ten sections will be (not necissarily in this order):
- A coding/command-line question pertinent to -- or directly from -- Assignment 1 (arrays, pointers, etc)
- A coding/command-line question pertinent to -- or directly from -- Assignment 2 (linked lists, structs, etc)
- A coding/command-line question pertinent to -- or directly from -- Assignment 3 (binary trees, recursion, buffer overflows, etc)
- An analysis question pertinent to Assignment 4 (data structures, performance, etc)
- A coding/command-line question pertinent to -- or directly from -- Assignment 5 (graphs, graph traversals, etc)
- Five quiz questions given to Section 101
- Five quiz questions given to Section 102
- 3-5 short questions from in-class workbooks and other lecture activities
- 2-4 medium-answer questions on pointers
- 2-4 medium-answer questions on how C works
The five Assignment-related questions will be similar in feel to the assignment question on the midterm, although some (not all) may be much longer. The two sections on quiz questions will feel like the quiz question section did in the midterm. And the last three sections in the list above will have a similar feel to the "medium-answer" questions from the midterm.
In terms of raw material, I plan for the exam to be about:
- 50% writing and reading C / command-line
- 25% understanding C (how memory is managed, how different data types are stored in memory, different types of memory like the heap and stack, stack frames, parameter passing, etc)
- 25% "theory" stuff (data structures, algorithms, complexity and performance)
How can I pass the exam?
If you're wondering what it'll take to pass the exam: I expect anybody passing this course to be comfortable and competent in using pointers. You should be able to reliably write C code with pointers in it, without having to guess whether there should be a star/ampersand present. You should be able to know how pointers behave and can be used. This applies to pointers of all types: ints, doubles, arrays of basic types, 2D arrays of basic types, structs, arrays of structs, double pointers, etc.
So how can you make friends with pointers? Some tips:
- Practice writing a lot of C code. Draw out a ton of memory diagrams as you do it.
- Don't cram. Start studying early and practice a little each day.
- Go back to Labs 3-5 and do those ones again, on your own, from scratch. These labs cover arrays and linked lists, both vital parts of C.
- Practice writing code on paper. Write your solution on paper, and then type it up and compile it to see if it is correct.
- Do *every* assignment if you haven't. Do any parts that you may have delegated to a partner.
- Do code reviews with friends.
How can I ace the exam?
Okay, so you're comfortable with pointers. How can you ace this exam? Some tips:
- Do all the quiz questions
- Do the midterm again
- Go over every in-class workbook, or problem I assigned on the blackboard in class
- Do a bunch of problems at Project Euler
- Remember the list of sorting problems from the midterm? (They're further down on the page). Do all of them (again).
Whether you're setting out to ace the exam -- or just to pass it -- remember to relax, get plenty of rest, eat well, and enjoy yourself. No matter how worried you may be about exams, you'll do much better if you feel better.
Midterm Exam
The midterm is scheduled for February 28, 2013, from 9-10 a.m. in EX200. You will have one hour to write the exam. The midterm is worth 10% of your final grade. It is closed book. You will not be allowed to bring an aid sheet of your own, but an aid sheet will be provided. It'll be the same one that you'll have on all quizzes from Feb 12 onwards. You can check it out here.
Content
Content-wise, the midterm will cover everything up to and including February 26. Note that content on the assignments, and in the readings, are examinable.
Format
Your midterm will be out 25, and consist of:
- Eight short answer questions, taken from quizzes given in class. (Four from Sec 101, Four from Sec 102).
1 mark per question; 8 marks total. - One short answer quesiton pertinent to your assignments. 2 mark.
- Four medium answer questions. 7 marks.
- One long-answer coding question. 8 marks.
Long-Answer Question
The long-answer coding question will ask you to write C code for one of the following ten problems:
- Selection Sort to sort a singly-linked list
- Selection Sort to sort a doubly-linked list
- Insertion Sort to sort a singly-linked list
- Insertion Sort to sort a doubly-linked list
- Binary search on a singly-linked list (note this will not be O(lgn) )
- Binary search on a doubly-linked list (note this will not be O(lgn) )
- Mergesort to sort a singly-linked list
- Mergesort to sort a doubly-linked list
- Quicksort to sort a singly-linked list
- Quicksort to sort a doubly-linked list
Be prepared to sort/search ints, doubles and chars (no strings though) -- and be able to handle me giving you a linked list definition with many member variables inside it (meaning you need to rearrange the nodes in the linked list, not simply copy values around the list). It is strongly suggested that you do write code for each of these before showing up to the exam! Helper methods will be a good idea for each of these.
Any Tips for Studying?
- Do all of the programming problems above on your own. Don't try to do them all in one night; make a schedule and plan to tackle them a couple of them every night over a period of 1-2 weeks. (There's a reason I've released the list well in advance of the midterm. :) )
- Last-minute studying won't put any of the knowledge you've looked at in long-term memory -- there's a lot of evidence that incremental studying over a long period of time is much, much more effective than cramming.
- Look at all the quizzes that have been given in the course. Go over every quiz you wrote -- and importantly -- the questions you got wrong. Print out the quizzes from the section that you aren't in, and do them. Quizzes for both sections are on Piazza.
- Look over the schedule up to and including February 26 -- if there are any topics you feel unfamiliar with, go over the pertinent readings again. If they're textbook problems, do the associated questions at the end of any chapter.
- It's likely that I'll ask you to describe some code that you would have handed in for Assignment 1/2. Be sure you understand all the code you and your partner wrote for those assignments.
- Relax, eat well, get exercise, get at least four hugs a day, and have a proper night's sleep the day before the exam (and every day beforehand!)