Back to marketplace

2.2.1 Programming Techniques

No description yet. This curated deck is ready for daily study.

Total cards: 7•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (7)

#1
Front (Question)

what is the difference between global and local variables

Back (Answer)

Global variables can be accessed from the entire program Local variables have a limited scope where they can only be accessed from the module of code they were defined in

#2
Front (Question)

what is the difference of passing in a parameter byval and byref

Back (Answer)

by value means that a coy of the data is given to the subroutine meaning anychanges to the data made inside the subroutine dont change the value passed in by ref gives the address of the data to the subroutine meaning any changes to the data update the address as its changed

#3
Front (Question)

what are the two ways to pass parameters into a subroutine

Back (Answer)

by reference and by value

#4
Front (Question)

define a recursive algorithm

Back (Answer)

a recursive algorithm is a function which calls itself from within the function

#5
Front (Question)

name the pros of a recursive algorithm

Back (Answer)

Certain problems are more suited to a recursive solution problems can be more elegantly solved can reduce the size of the problem on every recursive call more natural to read quicker to write

#6
Front (Question)

name the cons of recursion

Back (Answer)

uses more memory can run out of stack space difficult to debug harder to trace

#7
Front (Question)

example of a time recursion is idea

Back (Answer)

factorial fibbonnacci tree traversal