The exam will include all the material covered in discussion session (lab), lecture, quizzes, exercises, and projects (#1 and #2) including the following topics:
The exam will NOT cover the following topics:
The following suggestions can help you write code faster during the exam.
Instead of
if (ptr != NULL) {
}
use
if (ptr) {
}
When you have nested structures defining a pointer to a field can help.
/* Using a pointer to simplify handling structure fields */
printf("Section number is %d\n", all_courses[1].section1.section_number);
printf("Section number is %d\n", all_courses[1].section1.num_students);
/* Equivalent to previous two statements */
ptr = &all_courses[1].section1;
printf("Section number is %d\n", ptr->section_number);
printf("Number of students %d\n", ptr->num_students);
Instead of
if (strcmp(a, b) == 0) {
}
use
if (!strcmp(a, b)) {
}
Instead of
while (*p != '\0') {
}
use
while (*p) {
}
Practice material can be found in the grace system under 216public/exams/exam1. To transfer this material to your computer use https://dav.terpconnect.umd.edu . Use your directory id/passwd (same one used for grace) to log on.