4.1.1 FoP (Programming) Flashcards

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

Define Data type

A

An attribute of data that determines what sort of data is being stored and how it will be used

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

Define Integer

A

A data type for storing positive or negative whole numbers

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

Define real/float

A

A data type for storing numbers with decimal values

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

Define Boolean

A

A data type that can only store one of two possible values

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

Define Character

A

A data type for storing a letter, number or special character.

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

Define String

A

A data type for storing a sequence of characters or symbols

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

Define Date/Time

A

A data type for storing date or time values

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

Define records

A

A data structure that stores related data items in elements called fields, organised based on attributes

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

Define Array

A

A data structure for storing finite, ordered set of data of the same data type within a single identifier.

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

What is a pointer/reference type

A

Data type which are stores for memory addresses of objects created at runtime, dynamically.

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

Define user-defined data types

A

Custom data types designed by the user by combining existing data types, for the bespoke needs of their program

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

Define language defined data types

A

A primitive data type provided by a programming language

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

Define Subroutines(Procedures/Functions)

A

a named ‘out of line’ block of code that may be executed (called) by
simply writing its name in a program statement.

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

Why is it important to use meaningful identifier names

A
  • Makes logic of code easier to follow
  • Makes code self-documenting (Describes th elogic of the code as its developed)
  • Makes purpose of code clear
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are some advantages using named constants

A
  • Keeps the program code consistent
  • Makes it easier to read and debug a program.
  • Because it is immutable if it is to be modified, it is only to be done in one place.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are some advantages of using subroutines

A

1 - Reduces repition of code , as it can be reused
2- makes code more compact and easier to read as problems are broken down
3 - Easier to debug as subroutines can be tested independently from the whole program
4 - Faster development of large problems as the can be decomposed.

17
Q

How do subroutines use parameters

A

parameters are specified between brackets after subroutine call statement, these are required for the method to be run

18
Q

What is are the features of a local variabes

A

1 - One that exists while the subroutine is excecuted
2 - One that is only accessible within the subroutine

19
Q

Why is it good practice to use local variables

A
  • They use less system resources and so are more memory efficient
  • Easier to debum as they can only be modified in the subroutine and not all over the program
20
Q

What is a stack frame

A

A data structure that stores the return addressess, parameter and local variables when subroutines are called

21
Q

What is a recursive routine

A