Token in C

Token in C|what is Token in C language|all about Tokens|Types of Tokens

 Token in C is the smallest unit of a program that can be understand and divided by its categories by compiler.
when we compile the program several phases occur called tokens? all the alphabets of our programming language are called tokens.tokens can be classified in the following types:-

 Token in C are:

1) Keywords
2) Identifiers
3) Constant
4) Strings
5) Special symbols
6) Operator



    token in c flow chart : keywords,string,identifiers,special symbols.
    Token in C
    (Token in C is the smallest unit of a program that can be understood and divided by compiler. all the alphabets of our programming language are called tokens. Types of Tokens are Keywords, Identifiers, Constants, Strings, Special symbols, Operator)

    1) Keywords:

     Keywords Words are words whose meaning is already defined in 'C' language. and these words are also called reserved words. They are not used in variable and function names. you can't define keyword in your own way or defined keyword cant be redefined. They are as follows :



    auto           double      int               struct

    break         else          long             switch

    case           enum       register         typedef

    char           extern      return           union

    const         float          short             unsigned

    continue    for            signed           void   

    default       goto         sizeof            volatile

    do               if             static             while

    2) Identifier: 

    The identifier is naming convention to the user-defined objects like variable, function, array it starts with alphabets A-Z, a-z, '_'(underscore) and there are some rules to declare it. which are as follows : 

    a) Starts with alphabets or underscore.

    b) The keyword can't be used as name.
    c) C is case sensitive so upper case and lower case consider separately. 
    d) There must be space between characters or any identifier's name.
     examples: a b, 2ab, ab#, 123, etc.

    3) Constants:

     Constants are also like variables and the only difference is that their values can not be changed or modified at once the value is declared.constant is also called literals or it refers to the fixed value. constant can be declared in any data types like integer, real or floating number, etc.

    4) Strings: 

    A string could be a knowledge sort utilized in programmings, like associate degree whole number and the floating-point unit, however, is used to represent text instead of numbers. it's comprised of a collection of characters that may additionally contain areas and numbers. 

    Example: The word "hamburger" and therefore the phrase "I Greek deity three hamburgers" area unit each string. Even "12345" can be thought of a string, if such as properly. Typically, programmers should enclose strings in quotation marks for the info to recognized as a string and not a variety or variable name.

    5) Special symbols: 

    The following special symbols are used in C programming having some special means and they can't be used for different purposes.
    Example: [] () , ; * = # etc.
    • Brackets[]: gap and shutting brackets are used as array component reference. These indicate single and three-d subscripts.
    • Parentheses(): These special symbols are wont to indicate perform calls and performance parameters.
    • Braces: These gaps and finishing frizzy braces mark the beginning and end of a block of code containing over one possible statement.
    • The Comma (, ): it's wont to separate over one statement like for separating parameters in performing calls.
    • Semicolon: it's Associate in Nursing operator that basically invokes one thing known as Associate in Nursing formatting list.
    • Asterisk (*): it's wont to produce a pointer variable.
    • Assignment Operator: it's wont to assign values.
    • Preprocessor(#): The preprocessor may be a macro processor that's used mechanically by the compiler to rework your program before actual compilation.

    6) Operators:

    Operators are symbols that trigger Associate in Nursing action once applied to C variables and different objects. the information things on that operator's influence ar known as operands.

    Depending on the number of operands that Associate in Nursing operator will influence, operators will be classified as follows:

    Unary Operators: Those operators that need solely single quantity to influence ar referred to as single operators.For Example increment and decrement operators

    Binary Operators: Those operators that need 2 operands to influence ar known as binary operators. Binary operators are classified into :


    • Arithmetic operators.
    • Relational Operators.
    • Logical Operators.
    • Assignment Operators.
    • Conditional Operators.
    • Bitwise Operators.

    Tokens ke bare mai hindi mai jaan nai ke liye yee video dekhe 

    (टोकन के बारे में जानने के लिए इस वीडियो को देखें)

    Tokens in Hindi




    TO About Tokens In English Watch This Video


    Tokens in English


    In Our last Article We talked about Basics about C Programing language check out here and this is 2nd part of series.

     Thanks For Giving Time On Our Article To stay updated and to get earlier notifications of our articles "Press Subscribe Button In POPUP BOX" It's Absolutely Free. 

    Above Image Is Property of tech-updates.in and its Owner RS Tech PVT.LTD and Respective owners. reuse without permission for any purpose is strictly prohibited. For any query or permissions contact us.


    #Tokens in c #c programing language #tokens #cseries 

    Post a Comment

    0 Comments