Skip to content · ⁨Pular para o conteúdo⁩

Variables, types, and arithmetic · ⁨Variáveis, tipos e aritmética⁩

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;.
Português

Todo valor tem um tipo

  • Em C, toda variável tem um tipo que indica qual tipo de valor ela armazena.
  • Os três que você usa mais: int (um número inteiro), double (um número com ponto decimal) e char (um único caractere).
  • Você deve dar o tipo ao criar a variável: int n = 5; ou double pi = 3.14;.

Handout · ⁨Material de apoio⁩

Log in or create account · ⁨Entrar ou criar conta⁩

IGCSE, A-Level & AP