ABy Admin
May 13'24

Exercise

  1. Can a variable name start with a number?
  2. Can a variable name start with a typographical symbol(e.g. #, *, _)?
  3. Give an example of a C variable name that would not work. Why doesn't it work?
ABy Admin
May 13'24
  1. No, the name of a variable must begin with a letter (lowercase or uppercase), or an underscore.
  2. Only the underscore can be used.
  3. for example, #nm*rt is not allowed because # and * are not the valid characters for the name of a variable.

References

Wikibooks contributors. "C Programming/Exercise solutions". Wikibooks. Wikibooks. Retrieved 13 May 2024.

00