4.1.1 FoP (Programming) Flashcards
Define Data type
An attribute of data that determines what sort of data is being stored and how it will be used
Define Integer
A data type for storing positive or negative whole numbers
Define real/float
A data type for storing numbers with decimal values
Define Boolean
A data type that can only store one of two possible values
Define Character
A data type for storing a letter, number or special character.
Define String
A data type for storing a sequence of characters or symbols
Define Date/Time
A data type for storing date or time values
Define records
A data structure that stores related data items in elements called fields, organised based on attributes
Define Array
A data structure for storing finite, ordered set of data of the same data type within a single identifier.
What is a pointer/reference type
Data type which are stores for memory addresses of objects created at runtime, dynamically.
Define user-defined data types
Custom data types designed by the user by combining existing data types, for the bespoke needs of their program
Define language defined data types
A primitive data type provided by a programming language
Define Subroutines(Procedures/Functions)
a named ‘out of line’ block of code that may be executed (called) by
simply writing its name in a program statement.
Why is it important to use meaningful identifier names
- 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
What are some advantages using named constants
- 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.