Quiz Entry - updated: 2026.07.10
What are the basic scalar data types in C?
Three families: integer types (char/short/int/long/long long, signed or unsigned), floating-point (float/double/long double), and pointers.
Integer types:
// 1 byte, often used for characters
char c;
// At least 2 bytes
short int s;
// At least 2 bytes (usually 4)
int i;
// At least 4 bytes
long int l;
// At least 8 bytes (C99)
long long int ll;
Signed vs unsigned:
// Can be negative (default)
signed int si;
// 0 or positive only
unsigned int ui;
// 0-255
unsigned char uc;
Floating-point:
// ~7 decimal digits precision
float f;
// ~15 decimal digits precision
double d;
// Extended precision
long double ld;
Pointers:
// Pointer to int
int *p;
// Pointer to pointer to pointer to char
char ***c;
Read pointer declarations right-to-left:
int *p→ "p is a pointer to int"char **argv→ "argv is a pointer to pointer to char"
Tip: Use https://cdecl.org/ to decode complex C declarations!
Go deeper:
C data types — Wikipedia — the arithmetic types and their size guarantees.