IMPORTANT2 Flashcards

1
Q

Computer misuse act, make…

A

supplying or obtain

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

If not specified, are parameters passed by value or by ref?

A

by value

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

What happens if a parameter is passed by value?

A

a copy of the variable is passed to the subroutine where it is treated as a local variable thus protecting it from being changed by the subroutine but also using additional memory space. It is destroyed when the subroutine has completed.

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

What happens if a parameter is passsed by reference

A

the reference to the memory location of the variable itself is passed Therefore if the value of the variable is changed, it remains changed after the subroutine ends. A literal value can’t be passed by reference obviously as it has no reference (more applicable to recursive subroutines).

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

How do you pass parameters by value and by reference?

A

procedure calculateTotal(x:byVal, y:byRef)

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