COMP345S(W2021) midterm coverage
The following is the list of topics that are included in the midterm examination.
Some specific topics will not be part of the examination. These are denoted with an “NO” below.
• Slide Set 0
• none
• Slide Set 1:
• program structure
• compilation unit
• header/cpp files
• includes
• redundant includes
• namespaces
• Slide Set 2:
• structs and classes as data types
• variable initialization
• implicit/explicit type coercion
• static_cast, dynamic_cast
• upcasting/downcasting
• conversion sequences
• pointers
• pointer artithmetic
• pointers and const
• void/wild/dangling/null pointers
• stack/heap/new/delete
• arithmetics
• references
• smart pointers (NO)
Page 1 of 3
In general, you are responsible for all the material presented in slide set 0 to 5, along with the lab examples pertaining to them (i.e., lab 1 to lab 5), i.e. All class content until week: 14 February – 20 February included.
• parameter passing • strings
• Slide Set 3:
• input/output streams
• cin/cout
• files stream declarations, open/close, usage
• << and >> operator overloading
• MFC serialization (NO)
• Slide Set 4:
• classes vs. structs
• struct usage
• class declarations (.h and .cpp files)
• declaring/using objects
• with or without pointers
• inline functions/methods
• const specifier
• static specifier
• friends
• constructors/destructors
• declaration/implementation
• initialization list
• implicit/explicit constructor calls
• call chain
• inheritance
• overriding/overloading
• vs. constructor/destructor implementation
• assignment operator
• copy constructor
• shallow/deep copy
• multiple inheritance (Yes)
• virtual inheritance (Yes)
• diamond problem (Yes)
Page 2 of 3
• Slide Set 5:
• statically allocated arrays.
• declaration, usage
• memory allocation model
• passing as parameters
• dynamically allocated arrays
• declaration, usage
• memory allocation model
• passing as parameters
• array decay into a pointer
• static array classes
• STL containers
• declaration, usage • iterators
Page 3 of 3