Chapter 3 Data Types and Structures Flashcards
What is a data type?
A data type is the type of data that is used in the program. The way in which the data is manipulated will depend on the data type.
What is declared at the start of the program alongside a variable?
An identifier and a data type.
What are the 3 main data types?
Numeric, alpha-numeric and boolean.
What two types of numeric data types are there?
Integer and Real.
What two types of alpha-numeric data types are there?
String and Character
What kind of answer does a boolean have?
TRUE/FALSE or YES/NO
What kind of numbers can an integer be?
Whole
Can a real value have a decimal value?
Yes
What does a boolean do?
It can only have two values and is often used to see if a condition has occurred or a value has been met.
How many digits does a character normally have?
One
Which data type is used for longer pieces of text?
A String
What are the two data structures?
Arrays and Records.
What is an Array?
An array is a piece of data that contains several pieces of similar data.
What is meant by an element of an array?
Elements of an array are pieces of data with the same data type, similar memory size and are usually stored next to each other.
What orders the elements?
The index.