Chapter 7 - Programming Flashcards

1
Q

In a flow chart what does a slanted square mean?

A

Input or output

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

In a flow chart what does a square mean?

A

Process, doing something

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

What is machine code?

A

Instructions represented in binary used by the CPU

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

What does machine code consist of?

A

An opcode: tells the processor what to do

An operand: tells the processor what to do it to

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

What are binary bit patterns decoded by?

A

The processor’s logic circuits

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

What is high-level languages?

A

A programming languages which resembles a natural language, each instruction translates to many machine instructions. It is problem based rather than machine based.

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

Why is there a new for translators?

A

CPU does not understand high level code, therefore it must be translated into a set of machine code instructions

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

What is an assembler?

A

Software which translates mnemonic instructions in assembly language to machine code

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

What is a compiler?

A

Converts the whole high level code into machine code before running it

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

What is an interpreter?

A

Converts the code one instruction at a time, running each instruction before translating the next

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

What is source code?

A

Code written by the programmer

A compiler turns source code into object code which runs independently to the source code

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

Advantages + disadvantages of an assembler?

A

Precise and direct instructions to the computer hardware

Difficult to code and limited range of commands available

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

Advantages + disadvantages of a compiler?

A

Code runs quickly once compiled
Difficult for others to modify without access to source code
Initial compilation can be slow
Errors are generated for all the code at once - difficult to debug

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

Advantages + disadvantages of an interpreter?

A

Executes one statement at a time so easy to debug
Code can be developed and tested in stages
More portable as the code will run anywhere as long as there is an interpreter available
Interpreter takes up space in memory
Code executes slowly
Interpreter needed on target machine

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

What is an IDE?

A

Translators usually include an integrated development environment o help programmers

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

What are typical features of an IDE?

A
Source code editor
Error diagnostics and debugger
Run time environment
Translator (compiler/interpreter)
Automation tools
17
Q

What is a source code editor?

A

A text editing area organises the code including indenting structures and colour coding command words, variables an comments

18
Q

What is an error diagnostics and debugger,

A

Warnings identify potential problems with the code and listing errors found in the code

19
Q

What is a run time environment?

A

Allows the developer to run the code during development to check for logical errors

20
Q

What is a translator?

A

Compiled or interprets the source code into runnable machine code

21
Q

Why are automation tools?

A

Auto documentation: tracks variables, sub routines and comments as the project is developed ( produce text file used for maintenance)
Wizards: autocomplete woe as it is typed

22
Q

What is a constant/variable?

A

A named storage space reserved in memory to store the value associated with that variable name or constant

23
Q

What does an integer store?

A

Whole number values, positive or negative with no decimal part

24
Q

What does a real store?

A

Numbers with a decimal part or factional part

25
Q

What does a character store?

A

Single alphanumeric character

26
Q

What does a string store?

A

Any string of alphanumeric characters

27
Q

What does Boolean store?

A

Either True or False

28
Q

What does mean?

A

Is not equal to

29
Q

How do you select a specific variable in an array?

A

Using an index = array(3)

Starts at 0!!

30
Q

What is a syntax error?

A

Errors in the use of language rules and these are often identified by the IDE

31
Q

What are causes of logic errors?

A

Conditions that cannot be met in a conditional statement
Infinite loops
Incorrect algorithm
Incorrect expressions (calculations which are incorrect or missing a braquet)