Programming Techniques 11 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Define local variable.

A

A local variable is typically declared inside a subroutine and can only be accessed by that subroutine. It is created when the subroutine is called and is destroyed when the subroutine ends.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define global variable.

A

A global variable is typically declared at the top of a program outside any subroutine and is accessible throughout the program. It is created when the program starts and is destroyed when the program ends.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly