the basic types (char, int, short, long, float, double)
Imagine you keep boxes of different sizes: a tiny matchbox for a single letter, a medium box for a counting number, a big box for a number with a decimal point. C works the same way. Before you store a value, you tell the computer what KIND of value it is, and that choice decides how many bytes of memory the box uses and what the bits inside mean. These kinds are called types, and char, int, short, long, float, and double are the everyday ones.
char holds a single byte, usually one text character such as the letter A. int is the default whole number you reach for most of the time. short and long are whole numbers that are deliberately smaller or larger in range than int. float and double hold numbers that can have a fractional part, like 3.14, with double carrying about twice the precision of float. A key honest detail: the C standard does NOT fix exact sizes. It only guarantees minimum ranges and an ordering (char is at least 8 bits; short is no wider than int; int no wider than long). On a typical modern desktop int is 4 bytes and double is 8 bytes, but you should never hard-code that assumption.
Why this matters: the type you pick controls both correctness and cost. Choose a type too small and a value can overflow and silently wrap; choose a floating type when you needed an exact count and you can get rounding error. When you truly need a known width (exactly 32 bits, say), C offers fixed-width names like int32_t rather than guessing from int. Use sizeof to ask the compiler how big a type actually is on your machine instead of assuming.
char grade = 'A'; int apples = 42; long population = 8000000000L; double pi = 3.141592653589793;
Four variables of four basic types. Note the L suffix marks a long literal, and double keeps far more digits of pi than float would.
Sizes are NOT guaranteed by the standard; only minimum ranges are. Assuming int is always 4 bytes or that long is 8 bytes is a portability bug waiting to happen — use sizeof or fixed-width types like int32_t when the exact size matters.