e02 : Midterm exam - II

num ready? description exam date
e02 true Midterm exam - II Thu 05/23 05:00PM

Logistics

- Bring studentID and writing utensils
	- Preferable dark led
	- PLEASE WRITE LEGIBLY
- No electronic devices, No book
- 1 double-sided 8"x11" sheet of handwritten notes 
	- please don't staple them or write on two sheets
	- write your name and PERM# on the top right corner on both sides

Format

- Similar to midterm 1 (more or less)
- Possible types of questions
	- Short answers
	- Explain, describe, define, ...
	- Write some code
	- Fill in the blank
	- True / False (if false, explain)
	- Given code, write the output
- Covers a broad range of topics, but probably not everything.

Topics

Check the book and lecture notes for example problems.

  File IO
    - reading and writing from / to files

  C++ build process
    - Breaking code into multiple files (.cpp , .h)
    - Preprocessing vs. Compilation vs. Linking
    - Makefiles
      - General syntax
      - Conceptual understanding
      - Simple g++ compilation rules

  TestDriven Development
    - Write a test that does ...
    - Given tests, which ones pass
    - Explain Test Driven Development ...

  Arrays
    - Declaration
    - Syntax
    - Reading / writing elements

  Number Conversion
    - Any base to base 10 notation
    - Binary to base 10 / Base 10 to binary
    - Hex to binary / binary to Hex

  Memory concepts and pointers
    - Pointer syntax
    - Arrays as pointers
    - Dereferencing / address of
    - pass by reference vs. pass by value
    - reference variables

  Structs
    - Defining / declaring structures
    - pointers to structs
      - "->" operator vs. dereferencing

  Pointer Arithmetic
    - compute the offset of arrays
    - Segmentation faults
    - passing a pointer by value / reference

  Dynamic memory management
    - stack vs. heap
    - dynamic allocation / deallocation
      - "new" operator
      - "delete" operator
    - Dangling pointers
    - Memory leaks
    
  Linked lists
    - write a linked list structure for ...

Midterm 2 Practice Questions

Good Luck!