Programming Basics
- How many bits in a Byte?
- On a 32 bit machine, the size of a pointer variable has:
- Can you call a function in main before you declare it? Why or why not?
- What are the different ways we can pass parameters? (3)
- How to compile an entire program (multiple
.cpp
files) using one command? And what do each of the flags tell us?
- How do we run the executable created?
- How to separately compile files into a single executable? And why would we ever want to do this?
Input/Output
- What are the different types of files we need for classes and what do each of them include? (3)
- Why do we need to do
inFile.clear();
after erroring?
- Why can’t
.clear()
be replaced entirely by .ignore()
?
- What are some common preprocessor directives in the main file? (5)
- How to use
stringstream
to extract information
Classes
- What’s the difference between
Book b2
vs Book * b3 new book
- When is the destructor of an object called?
- Why wouldn’t we know the size of an object at compile time?
- Accessing/modifying private vs public members of a class