CS 210 – Fundamentals of Programming I  Fall 2012 – Written Exam 2 Review Sheet

advertisement
CS 210 – Fundamentals of Programming I Fall 2012 – Written Exam 2 Review Sheet
Reminders and announcements: ●
Monday, November 12, has been set aside as a review for Written Exam 2. We will go over Homeworks 5­7 as part of the review. Come prepared to ask and answer questions about the exam material. ●
Programming Assignment 7 is due on Monday, November. Please note that the material on structs and two­dimensional arrays will be on Written Exam 2, so it is in your best interest to complete this assignment.
Written Exam 2 will be on Wednesday, November 14. You may bring one 8.5in x 11in sheet of paper with notes on (only) one side to the exam. You may print out the sheet, but it must be in a 10­point font or larger. E.g., please do not photoreduce or print 4 pages on 1 side. If you handwrite your notes, they can be as small as you like. You may handwrite notes in the margins of a printout. The exam will be cumulative and comprehensive in the sense that you are expected to be able to read and write code using concepts from previous chapters. However, the exam will emphasize the material in Chapters 7, 8, and 10 (Chapters 8, 9, and 11 in 6/e); material covered in lectures and in­class exercises since Written Exam 1 through October 31; material in homeworks 5­7; programming assignments 5­7. Material on file streams (Chapter 11; Chapter 12 in 6/e), union types (Section 10.6; Section 11.6 in 6/e), separate compilation (Chapter 12; Chapter 13 in 6/e) and recursion (Chapter 9; Chapter 10 in 6/e) will not be on the exam. The format of the exam will be similar to that of in­class exercise questions, homework questions, and programming assignments. There will be questions asking you to explain and/or write C code examples, and short answer questions regarding concepts.
Consult the previous review sheet for earlier topics. The following is a list of topics that will be emphasized, but it is in no way to be construed as an exclusive list. 1. One dimensional and multi­dimensional arrays, including declaring arrays, accessing array elements, using arrays and array elements as function parameters.
2. Searching one­dimensional arrays using the linear search algorithm; sorting one­dimensional arrays using the selection sort algorithm; other array processing functions similar to finding the minimum value, computing the average value, etc.
3. Strings, including declaring strings, mean and use of the null terminator, input and output of strings, strings as function parameters, use of the string library functions such as strlen(), strcpy(), strcmp(), strcat(), etc.
4. Structs, including defining struct types, declaring struct variables, accessing struct components (fields), using structs and struct components as function parameters, nested structs, arrays of structs, and structs with array components.
When you are asked to write code, you will not need to write comments, function prototypes, or include directives.
11/06/2012
Page 1 of 1
D. Hwang
Download