SLR23 - PROGRAMMING TECHNIQUES Flashcards
1
Q
What is recursion?
A
when a function calls itself
2
Q
What is a global variable?
A
a variable that is:
- “typically” declared at at the top of a program outside of any subroutine
- accessible throughout the program
- created when the program starts
- destroyed when the program ends
3
Q
What is a local variable?
A
a variable that is:
- declared inside a subroutine
- only accessible by that subroutine
- created when the subroutine is called
- destroyed when the subroutine ends
4
Q
A