An Array is a data structure, a specialised way of storing data
How would you define an array in pseudo code?
SET name = [Bob, Dave, Sam]
SET name TO [Bob, Dave, Sam]
SET name TO ["Bob", "Dave", "Sam"]
What will be outputted as a result of the below code?
SET info TO [123,445,667,45,776,2,4] SEND info[5] TO DISPLAY
2
4
776
123
what best describes the below code?
SET info TO [[“Name”, “Score 1” , “Score 2”],[“Bob”, “Score 1” , “Score 2”],[“Name”, “Score 1” , “Score 2”]]
An Array
A data structure
A two dimensional array
one dimensional array
A sub program is a self contained sequence of program instructions that performs a specific task
From the list below identify why a programmer would use a subprogram?
Makes the program longer
Makes the program easier to read and test
make code more readable
Can reuse code
All of the above
What type of subprogram results a value?
Function
Procedure
What line number is the function called on?
1
3
5
6
7
8
9
What line number is a Subprogram defined on ?
A _____ Variable is defined within a subprogram and can only be used within that subprogram?.
Local
Global