Wk. 1-3 Review Flashcards
What is a variable?
A named location in memory
How many bits are there in a byte?
8 bits
What is an example of a unitary operator?
Increment or decrement operator (x++ or x- -)
What is a function?
A named block of code
What is a block?
{ }
What is a local variable?
A variable declared within the function
What is the syntax of a variable declaration
Data type and then identifier
What is the name of a function heading and body?
The function implementation
What is the syntax of a function?
[return type] [function identifier] [formal parameter list]
What is the syntax for a formal parameter?
[data type] [parameter identifier]
What is a declared function called?
Function prototype
What is the syntax for the function call?
[function identifier] [function call operator] [arguments]
What is the difference in syntax between an argument and a formal parameter?
The formal parameter contains the data type specified
Do arguments that are passed to a formal parameter have to be a variable?
No, they can be literal values or expressions
What are the 3 runtime rules?
- When a function begins execution, space is allocated for its parameters and local variables.
- When a function returns, that space is released.
- Parameters are always initialized with their corresponding arguments.