Skip to content

Variables, types, and arithmetic

Handout

Every value has a type

  • In C, every variable has a type that says what kind of value it holds.
  • The three you use most: int (a whole number), double (a number with a decimal point), and char (a single character).
  • You must give the type when you create the variable: int n = 5; or double pi = 3.14;.

Handout

Log in or create account

IGCSE & A-Level