Programing Fundementals Flashcards
What is an integer?
A whole number
What is a float/real?
A number with a decimal
What is a character?
A single number, letter or other ASCII character
What is a string?
0 or more characters eg. A word
What type of data does Boolean use?
True or false
How much storage would an integer usually use?
2 bytes
How much storage would a float or real usually use?
4 bytes
How much storage would a character usually use?
1 byte
How much storage would a string usually use?
1 byte per character
How much storage would a Boolean value usually use?
One bit
What is casting?
Converting between data types
What are the 3 basic programming constructs?
- Selection
- Sequence
- Iteration
What is selection?
A section of code that will only run if a certain statement is true
What is sequence?
A set of instructions, followed one after the other
What is iteration?
A repeating process (usually set by a FOR loop)
What does MOD do?
Give the remainder from a division
What does DIV do?
Give the result of a division without the remainder
In what two ways can you manipulate strings?
- Concatenation
- Slicing
What is concatenation?
Joining two strings together
What is slicing?
Selecting only a certain section of a string
What does SQL stand for?
Structured Query Language
What are rows known as in a database?
Records
What are columns known as in a database?
Fields
What does SELECT do in SQL?
Select which fields should be returned
What does FROM do in SQL?
Select the table the data should be taken from
What is * used for in SQL?
To select all fields
What does WHERE do in SQL?
Identify a condition returned values must follow eg. WHERE age > 18
What file handling operators are there?
- Read
- Write
What needs to happen before and after a file is operated on?
- Needs to be opened first
- Needs to be closed after