Comp 2 Revision Flashcards

1
Q

Describe two methods of translating high level code into machine code.

A

1) Compiler - translates all code at once / in one to - produces an executable file
2) interpreter - translates code line by line - will be translated every time it is run

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

Describe two examples of defensive design that should be considered when developing a program.

A

1) input sanitisation - cleaning up input data/removing unneeded data e.g. special characters
2) validation - checking whether input data should be allowed e.g. a value cannot be under 0 in some cases

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