Fundamentals of programming Flashcards
1
Q
What data type only holds whole numbers?
A
Integer
2
Q
What data type can hold decimal numbers?
A
Real/Float
3
Q
What data type only holds true or false?
A
Boolean
4
Q
What data type only holds one letter strings?
A
Character
5
Q
What does ‘const’ do when declaring a variable?
A
Makes it so that it cant be changed
6
Q
What loop is an example of definite iteration?
A
For loop
7
Q
What loop is an example of indefinite iteration?
A
While loop
8
Q
What is the difference between a local and a global variable?
A
Local variables are declared inside the function, global variables are declared outside the function.
9
Q
What is the difference between a function and a procedure?
A
Functions return values but procedures do not