CS246 Lecture Notes - Lecture 1: Dangling Pointer, Null Pointer, Stack-Based Memory Allocation
Document Summary
Conditional: if (condition) { statements else if (condition) { statements else { statements. Loops: while (condition) { statements for (initialization; condition; update) { statements break exits the current loop continue skips the rest of the current loop iteration and starts the next loop iteration. Declaration: asserts enough about the existence of an entity to permit type-checking to proceed; no further details. De nition: provides full details about the entity, and causes space to be set aside for it (in the case of variables and functions). De nition int x; int f(int x){ . struct s { . Declaration extern int x; int f(int x); struct s; An entity can be declared any number of times, but must be de ned at most once. For functions, this can typically be achieved by ordering the function de nitions carefully. However, this becomes impossible when functions are mutually recursive.