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

print­f("h­ell­o");
hello
print­f("x = %d", 5);
x = 5

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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