Computer Science & C Programming


3. Fundamental instructions

  1. Declaration: to reserve a memory space
type variable;
  1. Affectation: to store/initialize a value into memory
variable = expression; // = value OR variable OR operation
  1. Conditional:
if (expression) { ... } else { ... }
  1. Branching/loops:
label:
...
goto label;

Exercises:

  1. How to graphically represent the preceding elements ?
  2. What is the algorithm to compute 1+2+...+100 ?
END 1

13 - 15