Programming techniques - exam questions Flashcards

1
Q

Define the term parameter

A

An item of data that is
passed to a subroutine when it is called
and is used as a variable as the subroutine is running

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

Explain the term procedural programming language

A

A high level language that gives a series of instructions in a logical order

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

Explain how variables with the same name can be used in different procedures without causing errors

A

Local variables can be declared and referenced from within a single procedure.

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

Explain parameter passing

A

Parameters are passed either by value or reference.
When passed by value, a local copy of data is used within the function and deleted after it has run
When passed by reference the location of data is used, therefore the value stored in memory can be changed

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