Archived Content

This website is an archive of the Spring 2019 semester of CS 225.
Click here to view the current semester.
Back to Exams

Exam 1

Theory Exam 1 is designed to explore the foundational concepts of C++

Theory Exam 1 contains only multiple choice or short answer problems. You will have 50 minutes to complete this exam.

Topics Covered

Topics from lecture:

  • Classes in C++
    • Public members functions
    • Private helper functions
    • Private variables
    • Constructors
    • Automatic default constructor
    • Custom constructors (default and non-default)
    • Copy constructor
    • Automatic copy constructor
    • Custom copy constructor
  • Namespaces in C++
    • Creating a class that is part of a namespace (eg: Cube is part of the cs225 namespace)
    • Using a class from a namespace (eg: cs225::Cube)
    • Purpose and usefulness of namespaces
  • Variables
    • Four properties: name, type, location (in memory), and value
    • Primitive vs. user-defined
  • Memory
    • Indirection in C++:
      • Reference variables
      • Pointers
      • Differences and trade-offs between each type
    • Stack memory
    • Heap memory
  • Functions: Calling and Returning
    • Pass by value, by reference, and by pointer
    • Return by value, by reference, and by pointer

Assignments referenced:

  • lab_intro
  • lab_debug
  • MP1

Points:70

Registration: Thursday, January 17

Start: Thursday, January 31

End: Sunday, February 03