final cheat sheet everything

final cheat sheet everything - Data types int 0 char%c...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Data types: int %d, char %c, float %f(7 sig figs), double %lf (15 sig figs), array (aiValue), string (szName), FILE *fpIn Logical Expression ((operand logical operator operand) logical operator (operand logical operator operand)) \t (tab), \\ (prints \), \’ (prints ‘), \” (prints “), %% (prints %), \a (terminal beeps) Selective execution: if, else if, else, cascading, all contain logical expressions (except else) If v. switch: if: logical expression evaluated, any data type and can be complex; switch: variable is evaluated, int or char While: includes a logical expression, as long as the expression evaluates to true the loop repeats, when it becomes false loop terminates… pro: logical expression at top, con: can be skipped if initially false Do-While: even if logical expression is initially false code block will execute at least once, logical expression at bottom For: 3 parts separated by semi-colons: Initializing expression is assigning the initial value to the loop control variable, Test condition/terminating expression is the logical expression checked at top of loop and
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online