Fundamentals of programming Flashcards

Paper 1

1
Q

What is a data type?

A

A data type is defined by the values it can take or the operations which can be performed on it.

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

What is an integer?

A

A whole number, positive or negative, including zero.

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

What is a Real/Float?

A

A positive or negative number which can have a fractional part.

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

What is a Boolean?

A

A value that is either true or false.

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

What is a charater?

A

A single letter number or symbol

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

What is a string?

A

A collection of characters

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

What are pointers?

A

Ways of storing references.

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

Define Records.

A

A collection of fields, each of which could have a different data type.

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

What are arrays?

A

A finite, indexed set of related elements each of which has the same data type.

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

What are user defined data types

A

User-defined data types are derived from existing data types in order to create a customised data structure.

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

What is variale declaration?

A

This is when you create a variable giving it a name, sometimes giving it a data type.

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

What is constant declaration?

A

This is the same as variable declaration but when declared, it doesn’t change while the program is running.

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

What is assignment?

A

This is when you give a constant or variable a value.

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

What is iteraton?

A

This is when an instruction is repeated over a certain period of time.

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

What is selection?

A

This is when values are compared and an action is taken based on those values.

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

Define Subroutine

A

It is defined as a block of code containing set of instructions.

17
Q

What are relational Operations

A
  • Equal to → =
  • Not equal to → <> or !=
  • Less than → <
  • Greater than → >
  • Less than or equal to → <=
  • Greater than or equal to → >=
18
Q

What are local variables?

A

A local variable is a variable that can only be accessed from the subroutine within which it is declared.

19
Q

What are global variables?

A

Global variables can be accessed from any part of a program and exist in memory for the entire duration of the program’s execution.

20
Q

What is a recursive subroutine?

A

A recursive subroutine is a subroutine that calls on itself.

21
Q

What is a class?

A

A class is a blueprint for an object.

22
Q

What is an object?

A

They are instances of classes.