What two things are data types defined by?
The values they can take, and the operations that can be performed on them
Is -44 an integer?
Yes. An integer is a whole number- positive or negative- including zero.
Which data type can only be true or false?
Boolean
What is a user-defined data type?
A data type derived from existing data types in order to create a customised data structure.
What is meant by assignment?
Giving a constant or variable a value.
What is meant by iteration?
Repeating an instruction.
What is meant by a subroutine?
A named block of code containing a set of instructions designed to perform a frequently used operation.
In which type of iteration is the number of repetitions required not known before the loop starts?
Indefinite iteration
What visible feature of program code signifies nesting?
Indentation
Using integer division- what is 14 DIV 3?
4
Using the modulo operation- what is 30 MOD 4?
2
What is 1 XOR 1?
0
Name two advantages of using constants over hard-coded values
Constants can be given identifier names making code easier for a human to understand- and when updating a value constants only need updating at one position in code
What is meant by concatenation?
Joining two or more strings together to form a new longer string.
What is a seed value used for?
Generating random numbers.
What is a Catch block
The code which is run to handle an exception
What name is given to a type of subroutine which always returns a value?
Function
What are parameters used for?
Passing data between subroutines in programs.
What name is given to the actual value passed by a parameter?
Argument
Where can a global variable be accessed from
Any part of the program
Name three items stored in a stack frame
Return addresses
Parameters
Local variables
What is meant by a recursive subroutine?
A subroutine which is defined in terms of itself.
What is meant by a base case?
The terminating situation in recursion that does not use recursion to produce a result.
When would stack overflow occur
When a recursive subroutine never meets its base case