General Information
- Date: Thursday, April 21
- Time/Location: Your exam will take place in lecture.
- Duration: 75 minutes
- Closed-book, Closed-notebooks, No Computers/Calculators.
- Use a pencil/mechanical pencil (no pen) to answer the exam.
- Please take a look at the general exam rules available at
Exam Rules.
- Information about taking exams
Taking Exams
- The best way to prepare for the exam is to practice old exams.
- We curve in this course. After you have taken the exam, do not discuss
anything associated with the exam with other students that have
not taken the exam.
- Posting any information in Piazza about the exam after taking it
is considered an academic integrity violation.
- Please bring a stapler if you tend to separate the pages of the exam.
Exam Structure
- Short answer questions: This includes for example, multiple
choice, true/false and fill-in-the-blank type questions.
- Code analysis questions: We will give a short segment of code and
you may be asked to identify syntax and logical errors, generate code
output, etc.
- Code Writing: Write a program/code snippets to solve a given
problem. You should be prepared to give a complete program, but we may also
ask you to provide just a single function or a code fragment.
Topics
The exam will include all the material covered in discussion session (lab),
lecture, quizzes, and projects including the following topics:
- Unix - You must be familiar with the following commands
- cp
- ls
- echo
- tar (how to create a tar file and untar a file)
- C Language
- Preprocessor directives (e.g., #include, #define, #ifdef)
- Expressions
- Bitwise Operators
- Conditional statements
- Loops
- Arrays (one and two dimensional arrays)
- Strings - You are responsible for the following string functions:
- strlen
- strcpy
- strcmp
- memcpy
- memmove
- Pointers (including function pointers)
- enum
- Structures
- Unions
- Functions
- stdin, stderr, stdout
- Linkage
- Command line arguments
- exit
- err
- perror
- Dynamic Memory Allocation (malloc, realloc, free, etc.)
- Reading and writing from files. The following cheat sheet will be
provided in the exam Standard IO Cheat Sheet
- Memory maps - Please use the style provided in the following
example MemoryMapExample.pdf
- Linked Lists (both singly and doubly linked lists)
- Hashing (as it relates to our projects)
- Recursion
- Makefiles - You need to know how to define makefiles without using
implicit rules
- Big Endian vs. Little Endian
- Assembly
- irmovl, rrmovl, mrmovl, rmmovl
- addl, subl, multl, divl, modl
- jmp, jle, jl, je, jne, jge, jg
- pushl, popl, call, ret
- halt, .pos, .align, .long
- All registers
- rdch, rdint, wrch, wrint
- Any directives necessary to set a frame
- You do not need to follow caller save nor callee save usage conventions
- The following cheat sheet will be provided in the exam
Assembly Cheat Sheet
- Signals (you don't need to write code)
- Process Control
- Multitasking
- User/Kernel Modes
- Process Life Cycle
- fork()
- wait()
- waitpid()
- exit
- WIFEXITED(), WEXITSTATUS()
- execlp and execvp (you do not need to worry about the other exec* system calls)
- The following cheat sheet will be provided
Process Cheat Sheet
The exam will NOT cover the following topics:
- emacs, debugger (gdb), valgrind, splint, process control (dup2, pipes), Unix I/O
Practice Material
Practice material can be found in the grace system under 216public/exams/exam2. Keep
in mind that previously posted exams (those posted for Midterm #1) may include problems that cover material
associated with this exam.
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.
Web Accessibility