cs 1.1 Flashcards
(32 cards)
Integer
A whole number, positive or negative, including zero.
real /float
A positive or negative number which can have a fractional part.
Boolean
value that can be true/false
Character
a single number, letter or symbol
String
A collection of characters
Pointer/reference
a way of storing memory addresses
Records
a collection of fields, each of which could have a different data type.
Arrays
a finite, indexed set of related elements each of which has the same data type
User-defined data types
derived from existing data types in order to create a customised data structure
Variable declaration
creating a variable for the first time, giving name and sometimes data type. allocated a portion of computer’s memory to the variable
assignment
giving a constant or variable a value
iteration
repeating a block of code, could be definite(no. of repetitions known) or indefinite (no. of repetitions not known)
selection
comparing values + choosing an action based on those values
subroutine
named block of code, containing set of instructions designed to perform a frequently used operation
nested structures
one structure is placed within another (identified by different levels of indentation)
modulo
returns remainder of an integer division
12 MOD 8 = 4
Truncation
removing the decimal part of a no.
never rounds up
e.g. 3.14 truncated = 3
NOT
1 = 0
AND
1 1 = 1
0 1 = 0
OR
1 1 = 1
1 0 = 1
XOR
1 1 = 0
1 0 = 1
Variable
change their value during execution of a program
Constant
value cannot change once assgined
substring
giving a staring position and a length, return a portion of a string