6 - 28 Primitive data types, binary and hexadecimal Flashcards
1
Q
What an integer?
A
a whole number such as -25, 0, 3, 28679
2
Q
What is a real/float?
A
a number with a fractional part such as -13.5, 0.0, 3.142, 100.001
3
Q
What is a Boolean?
A
a Boolean variable can only take the value TRUE or FALSE
4
Q
What is a character?
A
a letter, number or special character typically represented in ASCII, such as a, A, 4, ? or %. Note that the character “4” is represented differently in the computer from the integer 4 or the real number 4.0
5
Q
What is a string?
A
anything enclosed in quote marks is a string, for example “Peter”, “123”, or “This is a string”. Either single or double quotes are acceptable.