Topic 1 Programming Flashcards
(37 cards)
Describe a data type?
Defined by the values it can take or the operations which can be performed on it.
Describe the data type known as integer?
A whole number, positive or negative, including zero
Describe the data type known as real / float?
A positive or negative number which can have a fractional part.
Describe the data type known as Boolean?
A value which is either true or false
Describe the data type known as character?
A single number letter or symbol
Describe the data type known as string?
A collection of characters
Describe the data type known as Date/Time?
A way of storing a point in time
Describe the data type known as records?
A collection of fields each of which could have a different data type
Describe the data type known as array?
A finite, indexed set of related elements each of which has the same data type
What are user-defined data types?
They are derived from existing data types in order to create a customised data structure
Why are user defined data types used?
Ensure that a solution is as memory efficient as possible
what is variable declaration?
Allocates a portion of the computers memory to the variable.
What is constant declaration?
Same as same as variable declaration but when creating a constant. The value of a constant does not change while the program is running.
What is assignment in programming?
Giving a constant or variable a value
What is iteration?
The process of repeating a block of code or instruction, this could be definite or indefinite
What is selection?
Comparing values and choosing an action based on those values.
What is a subroutine?
A named block of code containing a set of instructions designed to perform a frequently used operation.
What is definite iteration?
A type of iteration in which the number of repetitions required is known before the loop starts
what is indefinite iteration?
A type of iteration in when the number of repetitions required is not known before the loop starts
What is nesting in programming?
One structure is placed within another and can be easily be identified by different levels of indentation in code.
Why is indentation used in programming?
Easier for humans to understand
Why should a programmer use sensible and meaningful identifier names?
Makes it easier for others to understand what the purpose of the named object is within the program
How do you perform the MODULO function in C# and what does it do?
Returns the remainder of am integer division. The symbol is: %
What is truncation?
Removing the decimal part of a number. Never rounds up.