What are the primary programming constructs?
What are examples of count-controlled and condition-controlled loops?
Count: For loop
Condition: While loop
A function calling itself until a condition is met
What are the benefits and drawbacks of recursion?
Can be used to traverse trees
Requires more storage space than an iterative solution
A missing condition will lead to a stack overflow
Define 'global variable'
- A variable accessible anywhere within a program
- Allocated a distinct memory location during execution
Define 'local variable'
- A variable only accessible within a specific part of a program
- Usually defined within a function or passed by value
Refers to where a variable/constant can be accessed.
The scope is either local to a subroutine or global to a program
Explain 'passing by value'
A copy of the variable is created within the subroutine, therefore the original variable is unchanged without returning the value
Explain 'passing by reference'
A pointer to the variable is created when passed.
When changed within the subroutine, it is updated to the original as well
Integrated Development Environment:
Provides tools and an area to create code
What are some common features of an IDE?