Identify 5 different data types used in programming
INTEGER
REAL
CHAR
DATE
BOOLEAN
STRING
Why do we use records in programming
Allow us to combine different data types under one identifier
What is the name given to an individual element in an array
Element
What happens when a search item is found in a linear search
The algorithm ends
A bubble sort compares .....
adjacent element
What data type should be used for the following password that contains a mix of data types:
S4L4H
STRING
What is the correct name for the record data type
Composite data type
An array should always use the same .....
Datatypes
What type of loop should be used in a linear search
Post condition loop
Which type of loop does a bubble sort use
Nested loop
Why is it important to declare the data type when using a variable
Different data types are stored differently in memory. They declare the type tells the system how much memory to allocate and how to manage the data, improving efficiency.
How can we declare a record in a programming language (not pseudocode)
OOP using classes
Explain the difference between a 1D array and a 2D array in structure and usage.
A 1D array is a linear list, a 2D array consists of rows and columns
Describe the time complexity of a linear search
The time increases linearly for every item added to the array.
Why does a bubble sort iterate for one less than the length of the array
The last element does not have an adjacent element for the purpose of comparison.