Answers to questions on identifiers

  1. Which of the following is legal and which is not as a C identifier:
    1. 12PipersPiping
      Illegal, starts with a digit.
    2. The12thDayOfChristmas
      Legal, matches definition.
    3. _syscall
      Legal, underscore is allowed anywhere in an identifier.
    4. $bill
      Illegal, dollar is not a legal character in an identifier.

The questions


Back to the notes on identifiers