Practical C Programming, 3rd Edition

I l @ ve RuBoard

  • Always put a default case in a switch statement. Even if it does nothing, put it in:

    switch (expression) { default: /* Do nothing */; break; }

  • Every case in a switch should end with a break or a /* fall through */ statement.

I l @ ve RuBoard

Категории