C++ Keywords | Token | Trigraphs | My CS Tutorial - My CS Tutorial

Breaking

Programming languages full tutorial and programs, exam papers, visual basic( Vb.net ), information of new technologies and more....

Thursday, July 16, 2020

C++ Keywords | Token | Trigraphs | My CS Tutorial

C++ Token | Keywords in C++ | C++ keywords | OOPs keywords | Trigraphs in c++ programming | Tokens in C++ | My CS Tutorial


Keywords are explicitly the reserved identifiers and can not be used as the name for program variables or other user defined program elements.

Keywords in c++ | My CS Tutorial

TOKEN


The smallest individual units in a program are known as token.
C++ has following tokens :-

(i) Keywords
(ii) Identifier
(iii) Constants
(iv) Operators
(v) String

C++ KEYWORDS


Keywords are words that have already been interpreted to the C/C++ compiler.
Keywords can not be used as variable names because if we do this, then we are trying to give a new meaning to the keyword that is not allowed by the computer.
The Keywords are also called 'Reserved words'.
The following list shows the reserved words in C++. These reserved words may not be used
as constant or variable or any other identifier names.

asm             else             new              this
auto           enum       operator       throw
bool         explicit        private          true
break       export       protected        try
case.         extern         public        typedef
catch.         false         register        typeid
char           float    reinterpret_cast              
                                                       typename
class           for        return        union
const         friend     short       unsigned
const_cast    goto    signed       using
continue       if         sizeof        virtual
default       inline     static         void
delete          int      static_cast    volatile
do               long      struct         wchar_t
double    mutable   switch        while
dynamic_cast    namespace    template


TRIGRAPHS


A few characters have an alternative representation, called a trigraph sequence. A trigraph is
a three-character sequence that represents a single character and the sequence always starts
with two question marks.
Trigraphs are expanded anywhere they appear, including within string literals and character
literals, in comments, and in preprocessor directives.

Following are most frequently used trigraph sequences:-

Trigraph                 Replacement

??=                                   #
??/                                    \
??'                                    ^
??(                                    [
??)                                    ]
??!                                    |
??<                                   {
??>                                   }
??-                                    ~



C++ Token | Keywords in C++ | C++ keywords | OOPs keywords | Trigraphs in c++ programming | Tokens in C++ | My CS Tutorial

_______________________________________


Please share this post and blog link with your friends.For more programs use this blog.

If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.If you have any method of this tutorial or program or want to give any suggestion send email on hc78326@gmail.com

Created by-- HARSH CHAUHAN

No comments:

Post a Comment