YEAR 1 CO1 WEEK 12 PROGRAMMING LANGUAGES Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Why do we use programming languages?

A

Instructions in CPU in binary. People find this hard to write so we have human friendly languaged developed to help write programs.

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

Describe Machine code.

A

CPU can only process binary data including program instructions themselves.
Different binary numbers represent particular instructions so machine code for one CPU might not run on another CPU.

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

Describe Assembly language.

A

Assembly language made up of predetermined set of commands that can be read by a human.
Each command directly translates into machine code number.
Low level language as nearly same as machine code due to being low level abstraction.
Uses mnemonics which have a direct link to its machine code equivelant.

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

Describe procedural language.

A

Procedural computer language allows programmer to set out step by step what computer needs to do and how to do it.

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

What are the properties of a procedural computer language.

A

Is an imperative language (gives orders or instructions )
Sequential (instructions carried out one after another)
Has statements in blocks called procedures and functions.

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

Define program flow.

A

The path that the program follows.
Either simple or complex depending on what it is asked to do.

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

Key features of a procedure.

A

Can take one or more inputs called arguments.
Performs an operation using arguments.
Not return a value.

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

Key features of functions.

A

Named sections of code.
Called as part of an expression.
Returns a single value to place function was called from.
Takes one or more inputs called arguments.

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

Define reserved words.

A

Words that cannot be used as an identifier as has a special meaning to the compiler.

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

Local variable.

A

Declared inside function.
Can be accessed only within function or block it was declared in.

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

Global variable.

A

Global variable declared outside of function.
Accessible throughout entire program.

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