Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
13 Cards in this Set
- Front
- Back
(56) What two things are defined by variable scopes?
|
1. How long the variable exists in memory<br/>2. Which parts of the program have access to the variable
|
|
(56) What are the three basic scoping rules in C programming?
|
1. Local<br/>2. Global<br/>3. Static
|
|
(56) Which variables are declared within a specific block of code, usually a function?
|
Local variables
|
|
(56) Where are local variables stored with regard to memory?
|
On the program stack
|
|
(56) With regard to memory, how long do local variables occupy memory?
|
They only exist while the function the variables belong to is running
|
|
(56) Are local variables accessible and modifiable to any function in a program?
|
No. they are only accessible and modifiable to the function that created them
|
|
(59) Which variables are declared outside of any function?
|
Global variables
|
|
(59) Are global variables accessible and modifiable to any function in a program?
|
Yes
|
|
(59) With regard to memory, how long do global variables occupy memory?
|
They exist in memory for the life of the program
|
|
(62) Which variables represent a special blend of variables that are declared within a function and also exist throughout the life of a program?
|
Static variables
|
|
(62) What must happen when declaring a static variable that differs from all other variable declarations?
|
The keyword<i>static</i> must be used
|
|
(65) What are the means of providing functions with the external data needed to complete their tasks?
|
Function arguments
|
|
(65) Where are the data types of function arguments defined?
|
In the function definition
|