02 - Data Types Flashcards
What value will sizeof(char) always return?
1
What type is missing in this hierarchy?
char <= ??? <= int <= long <= long long
short
How many bytes does the C standard require for the short data type?
> = 2
How many bytes does the C standard require for the intndata type?
> = 2
How many bytes does the C standard require for the long data type?
> = 4
How many bytes does the C standard require for a pointer?
Nothing
The standard does not define the length of a pointer
What is the data type of this constant?
7
Integer (int by default)
What is the data type of this constant?
3.141
Floating point (double by default)
What is the data type of this constant?
-12.4e-24
Floating point (double by default)
What is the data type of this constant?
1000000000ll
long long
What is the data type of this constant?
902ul
unsigned long
What is the data type of this constant?
7.45f
float
What is the data type of this constant?
‘\n’
char
What is the data type of this constant?
“\n”
string (array of char)
What is the data type of this constant?
“Hello, World!\n”
string (array of char)