Recall & Review
beginner
What is a data type in C?
A data type in C tells the computer what kind of data a variable can hold, like numbers or characters.
Click to reveal answer
beginner
Name the four basic data types in C.
The four basic data types in C are
int (for whole numbers), float (for decimal numbers), char (for single characters), and double (for double precision decimal numbers).Click to reveal answer
beginner
What is the difference between
int and float?int stores whole numbers without decimals, while float stores numbers with decimals (fractional parts).Click to reveal answer
intermediate
How much memory does a
char usually take in C?A
char usually takes 1 byte of memory, enough to store one character.Click to reveal answer
intermediate
Why do we use
double instead of float sometimes?double stores decimal numbers with more precision and uses more memory than float. Use it when you need more accurate decimal values.Click to reveal answer
Which C data type is used to store whole numbers?
✗ Incorrect
int is used for whole numbers without decimals.What data type would you use to store a single letter?
✗ Incorrect
char stores a single character or letter.Which data type uses more memory and stores more precise decimal numbers?
✗ Incorrect
double uses more memory and stores decimal numbers with higher precision than float.How many bytes does a
char usually take?✗ Incorrect
A
char usually takes 1 byte of memory.Which data type would you choose to store the number 3.14?
✗ Incorrect
float is used to store decimal numbers like 3.14.Explain the main differences between
int, float, char, and double in C.Think about what kind of data each type holds and their precision.
You got /4 concepts.
Why is it important to choose the correct data type when declaring a variable in C?
Consider how data type affects memory and accuracy.
You got /4 concepts.