Show Menu

C 2017 TP1 Cheat Sheet by

c

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

Download the C 2017 TP1 Cheat Sheet

1 Page
//media.cheatography.com/storage/thumb/pierre-imerir_c-2017-tp1.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

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