Instructions: Add items
at the appropriate level. Preface topics with:
C: if this is a C (and not C++) topic
Adv: if this is an advanced topic
For example:
[C Adv] Dynamically Allocating
memory for an array
Put new submissions in itallics for my review (DFR)
=================================================
Identifiers: How to name things in a program
Variables: Basic types (int, char, float, bool)
Assignment Statement: Storing a value in a variable ( = )
Arithmetic operators: (+, -, *, /, %)
Increment and decrement (++, --)
Combining arithmetic operations and assignment: (+=, *=, etc.)
Using the basic "console" (cin, cout)
[C] Basic "console" I/O (printf, scanf)
Formatting output
Floating point numbers
Left or right justifying
[C] Floating point numbers
[C] Left or right justifying
File I/O
Boolean Expressions: Comparison Operators (<,>,==,&&, ||, ...)
Branching: Choosing between alternatives (if-else, switch)
if-else statement: choosing between alternatives
if by itself, compound statement using brackets { ....}
if-else
nested if statements
multi-way if
hanging else: If there are two if statements and one else, which if does the else belong to?
switch: an alternative to multi-way if
[Adv] decision statement
Loops: Repeating the same section of code multiple times
while
do-while
for
break and continue
Predefined functions (e.g. sqrt), transfer of control
Functions that return a single value
Parameters: sending values to a function
Default arguments
Value vs. Reference Parameters: sending values, changing them, and having changes reflected back to the caller
Reference Parameters: use an '&' in the parameter list
[C] Reference Parameters: pass with '&', catch with '*', use with '*'
[C] Passing a reference parameter to a function, which in turn passes it to a third function, with changes reflected all the way back.
[C] Using scanf with a reference parameter (the '&' and the '*' cancel each other out)
Scope: which variables are accessible at any one point in the program? Using the same variable name multiple times in the same program.
Random number generator
Recursion: having a function call itself
Factorial
Number reversing
Input characters reversing
Overloading
[Adv] Functions as parameters (pointers to functions)
Declaring and referencing arrays
Passing arrays to functions
Two-dimensional arrays
Sorting and searching arrays
Bubble sort
Linear search vs. Binary Search
Quick Sort
System function qsort
Pointer declarations
A simple model of memory (char, char*)
Pointer arithmetic
Pointers and arrays
Declaring strings
Initializing strings
Common string functions (strcmp, strcat)
strcmp: comparing strings
strcat: concatenating strings
Character functions commonly used with strings
tolower: convert to lower case
isalpha: see if a character is alphabetic
Character lookahead (peek, putback)
Other string functions
getline: reading a line at a time
[C] fscanf: size-limited reading of a string, can read a line at a time
[C] sprintf: "printing" into a string
[C] strtok: string tokenizer, used to extract words from a file
Limitations of parallel arrays to associate data of different types
Declaring a structure type
Initializing a structure
Self-referential structures
User-defined types using typedef
new and dispose
[C] malloc and free
Dynamically allocating an array that grows as it needs to
Declaring a list "node"
Connecting several list nodes
Dynamically allocating and connecting nodes
Traversing a list
Reversing a list
Defining a class and member functions
Encapsulation
Public and Private members
Accessor and Mutator functions
Constructors: initializing class objects
Destructors: cleaning up deallocated class objects
Class String
Sample Applications
Library Functions
ASCII table
Operator Precedence
Debugging Techniques
assert
[C] printf with fflush(stdout) to ensure output appears
Useful UNIX commands