Show Menu
Cheatography

C 2017 TP1 Cheat Sheet by

Déclar­ations de variables

typename variab­lename;
typename variab­lename = expres­sion;

Conditions

if (expre­ssi­onBool) { ... }
if (expre­ssi­onBool) { ... }
else { ... }
if (expre­ssi­onBool) { ... }
else if (expre­ssi­onBool) { ... }
...
else { ... }
 

Boucles

while (exprBool) { ... }
do { ... } while (exprB­ool);
for(init ; exprBool ; incr) { ... }

For / While

for (a ; b ; c) { d; }

// equivalent to

a; 
while(b) {
   d;
   c;
}
 

Afficher du texte

printf­("he­llo­");
hello
printf­("x = %d", 5);
x = 5
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          C Reference Cheat Sheet
          C program Cheat Sheet