Skip to content · ⁨Passer au contenu⁩

Variables, types, and arithmetic · ⁨Variables, types et arithmétique⁩

English

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;.
Français

Chaque valeur a un type

  • En C, chaque variable possède un type qui indique la nature de la valeur qu'elle contient.
  • Les trois que vous utilisez le plus : int (un nombre entier), double (un nombre à virgule) et char (un caractère unique).
  • Vous devez spécifier le type lors de la création de la variable : int n = 5; ou double pi = 3.14;.

Handout · ⁨Fiche de cours⁩

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP