• TestingDocs
TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

C++

C++ Identifiers

Overview

In this tutorial, we will learn about C++ identifiers. A C++ identifier is a name used to identify a variable, class, function, or other user-defined items in the program.

Naming Rules

The rules of the C++ language determine the valid identifiers. There are some rules for valid or qualified identifiers.

The first character of an identifier must be alphabetic[A to Z]  or [a to z] or an underscore( _ ). The first character cannot be a numeric digit i.e [0 to 9].

Note that C++ is a case-sensitive programming language. For example, studentNo and STUDENTNO are two different identifiers in C++.

C++ reserved words cannot be used for identifiers. For example, throw is a reserved word. We cannot have an identifier with this name.

 

C++ Identifier

Examples

Some valid and legal identifiers are as follows:

  • i
  • abc
  • studentName
  • testing_docs
  • _temp

Some unqualified identifiers are as follows:

  • 9name
  • else

—

C++ Tutorials

C++ Tutorials on this website:

https://www.testingdocs.com/c-coding-tutorials/

For more information on the current ISO C++ standard

https://isocpp.org/std/the-standard

Related Posts

g not found OpenSuse

C++ /

Install GCC C++ Compiler on OpenSuse

sum of digits c program

C++ /

Sum of Digits of a Number C++ Program

C++ Hello World Program

C++ /

C++ Hello World Program

C++ /

Object-Oriented Programming Language Examples

C++ /

Object-Oriented Programming Features

‹ Basic C++ Syntax› C++ Comments

Recent Posts

  • How to secure your SQL Database: Tips and Tricks
  • Shaping the Future of Development: Exploring Key Trends in Software Engineering
  • Improving Java Performance with Multithreading
  • Difference between PHP and JavaScript?
  • Bing Conversation Styles
  • ChatGPT Introduction
  • Open Source AI Frameworks
  • Artificial Intelligence Tools
  • Top AI Music Applications
  • Top AI Website Design Tools

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com