2.2 - Programming Fundamentals Flashcards

(6 cards)

1
Q

Describe the difference between a ‘Variable’ and a ‘Constant’.

A

A variable’s value can change while a program is running, whereas a constant’s value cannot be changed once the program has started.

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

Define the term ‘Casting’.

A

The process of converting one data type into another, such as converting an integer to a string.

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

Identify the purpose of the arithmetic operators ‘MOD’ and ‘DIV’.

A

MOD returns the remainder after division, while DIV returns the integer part of the division with no remainder.

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

Describe one difference between a ‘Function’ and a ‘Procedure’.

A

A function returns a value, whereas a procedure does not return a value.

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

List three benefits of using sub programs (subroutines).

A

They modularise programs making them easier to design and test; allow code reuse; and make programs easier to debug and maintain.

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

State the SQL wildcard used to return all fields from a table.

A

The asterisk (*).

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