Fall 2009 Test #2 Review Page CSE1320 Section 002 Dr. Tiernan’s section Topics to be covered on Test #2 with notes from Ch. 1 - 9+ plus other material (including from Chapters11) as covered in class: Main Topics Test #2 is IN CLASS Recursion Section 002 : Fri. Nov. 13, 11:00pm Be able to define recursion and discuss recursion vs. iteration Merge sort, Binary search Be able to write a recursive function and understand a recursive function Dynamic memory allocation Malloc, calloc, and free Memory allocation and pointers Why would dynamic memory allocation be used Structures Creating data types, Declaring variables, Accessing members Assignment of whole structures and of member value Bit fields Pointer members for linked lists Pointers to structs Enumerated types Be able to create an enumerated type and declare a variable Form and purpose Unions Be able to create a union type and declare a variable Form and purpose Scope and storage class Local and global Auto, static, register, extern, and typedef Difference between scope and storage class and how they are related Strings and string functions String functions including but not limited to: Strcat, strcpy, strlen, … Allocating space to store strings Command line parameters Where parameters are passed from Format of parameters Argc, argv Pointers Base type, what a pointer contains, accessing contents, notation: *, & Understand pointer arithmetic, array notation with pointers Vocabulary– dereference, indirection, addressing operator Passing pointers as parameters Allocating space with malloc and deallocating with free Double indirection Arrays of pointers Interpreting C statements and declarations Pointers to functions Abstract data types (ADTs) ADT vs. physical data type Stack Queue Array What characteristics define an ADT? Linked lists What is it for and what pieces are required to make a linked list? Be able to write code to link nodes in a linked list Be able to trace linked list code and determine final results Secondary and Related Topics Conditional operator ?: Sorting and Searching Test will have some or all of the following characteristics: multiple choice questions (not more than 10) - typically 1 to 2 points each short answer questions coding questions which require either writing code or interpreting code or debugging code ( ‘code’ includes declarations, preprocessor directives, function definitions and general coding of statements and control structures and I/O commands) matching questions fill-in-the-blank questions Questions generally have their point value listed in braces at the end/side of the question Every test will have at least 10 points worth of extra credit available Almost all my tests are open book tests - which means that the answers are not in the book. The book is a reference for you to use in thinking through a problem. Test grades are assigned on a curve based on the range of actual scores on the test, i.e. the highest score on the test (for example, an 89) will be the top of the curve so all scores will be assigned based on where they fall (100 - 90 A, 89 - 80 B, etc.) AFTER the actual score has been divided by the curve. For example, a high score of 89 would give that student an A because 89/89 100 = 100. On the same test then, a score of 68 would be curved as 68/89*100 = 76 so that student would get a C (rather than a D for the original 68). The test will make you think not just remember. I write very challenging questions that require you to think all the way through them. A small number of the questions will be memory type questions because some rules must be memorized to make a student an efficient programmer in a language. Most, however, will require lots of mental effort. Do not get too upset about it - remember EVERYONE is suffering through the same test you are and that everyone’s grade will be curved. Check out my website for a few sample test questions from previous semester’s tests. They will give you a sense of how my tests are written.