1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-16 19:54:38 +02:00

Added some extra information

This commit is contained in:
Elton Viana
2015-10-12 11:17:18 -03:00
parent ed716a3a95
commit 253d0d9281

View File

@@ -221,11 +221,11 @@ int main() {
0 || 1; // => 1 (Ou lógico)
0 || 0; // => 0
//Expressão condicional ( ? : )
//Expressão condicional ternária ( ? : )
int a = 5;
int b = 10;
int z;
z = (a > b) ? a : b; // => 10 "se a > b retorne a, senão retorne b."
z = (a > b) ? a : b; // => 10 "se a > b retorne a, senão retorne b."
//Operadores de incremento e decremento:
char *s = "iLoveC";
@@ -291,6 +291,8 @@ int main() {
for (i = 0; i <= 5; i++) {
; // Use ponto e vírgula para agir como um corpo (declaração nula)
}
// Ou
for (i = 0; i <= 5; i++);
// Criando branchs com escolhas múltiplas: switch()
switch (alguma_expressao_integral) {