EECS 183 Lecture Notes - Lecture 7: Operand, No Type
1
EECS 183 Full Course Notes
Verified Note
1 document
Document Summary
Declaration may omit parameter identifier because identifier is used in code in definition. Ex: int square (int x); or int square (int); But, always use names even in declaration to make it clear. Rme should appear with the function declaration, not repeated at definition. Ex: no cout << square (int x) << endl; Instead, use cout << square (x) << endl; Functions: the end of the file of the enclosing block. Once execution exits the scope of a variable, the variable is de-allocated. When another function is called within the scope of the variable, the variable still exists, but is not accessible while executing the called function. The if keyword means it is the start of a branch. Condition is within the parentheses after the if keyword. If only one statement, it is possible to not have curly braces. But, it"s always good style to have curly braces even if only 1 statement following if.