C++ Identifiers

In this tutorial you will learn about the C++ Identifiers and its application with practical example.

C++ Identifiers

In C++, an identifiers is a name given to program elements such as variables, array, class and functions etc. An identifier is a sequence of letters, digits, and underscores, the first character of which can not be a digit. Following rules must be kept in mind while naming an identifier.

  • The first character must be an alphabet (uppercase or lowercase) or can be an underscore.
  • An identifier can not start with a digit.
  • All succeeding characters must be alphabets or digits.
  • No special characters like !, @, #, $, % or punctuation symbols is allowed except the underscore”_”.
  • No two successive underscores are allowed.
  • Keywords can not be used as identifiers.

Note :- C++ is a case-sensitive programming language, which means “Abc” and “abc” are not the same.

In this tutorial we have learn about the C++ Identifiers and its application with practical example. I hope you will like this tutorial.