-
Notifications
You must be signed in to change notification settings - Fork 0
Data Types
The int
data type allows the user to represent a number with no decimal part in code. A single int
is signed and occupies 32 bits of space in memory, meaning all numbers within the range
The bool
data type allows the user to represent truth values in code. A single bool
occupies 32 bits of space (only 1 bit is needed, but space was sacrificed for simplifying compilation) and can only take a value of true
or false
, which are represented within the compiler as the integers 1
and 0
respectively.
The string
data type allows the user to represent a string of characters in code. String literals can only be used within a call to the printf
function, allowing the user to print format strings to the console. Any other use of strings are forbidden.