- Date: Thursday, April 20
- 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
- Information about 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.
- 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
- 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.
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
- rm -r
- How to create a compressed gzip archive file
- How to uncompress a tar.gz file
- How to use grep to find patterns in a file
- How to pipe the output of one program to another (e.g., ls | wc)
- C Language
- Preprocessor directives (e.g., #include, #define, #ifdef)
- Bitwise Operators
- Conditional statements
- Arrays (one and two dimensional arrays)
- Strings - You are responsible for the following string functions:
- Pointers (including function pointers)
- stdin, stderr, stdout
- Command line arguments
- 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. Previous
exam solutions consider as correct using a pointer to the first array element in order
to describe an array; that is not correct. See the diagram we have provided.
- Linked Lists (both singly and doubly linked lists)
- Makefiles - You need to know how to define makefiles without using
- Big Endian vs. Little Endian
- Optimization (as described by the lecture slides - Optimization.pdf)
- 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
The exam will NOT cover the following topics:
- emacs, debugger (gdb), valgrind, splint, process control (fork, exec, dup2, pipes, etc.),
signals, Unix I/O
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.