C Tokens

C Tokens

  1. Every C program is a collection of instructions and every instruction is a group of some individual units.
  2. Every smallest particularly individual unit of a ‘C’ program is called token.
  3. Every instruction used in any c program is a collection of tokens. The main and particular work of  tokens are to construct c programs and they are said to the basic building blocks of a c program also.

    In a c program, some very popular tokens are the following:-
  1. Keywords
  2. Identifiers
  3. Operators
  4. Special Symbols
  5. Constants
  6. Strings
  7. Data values

In a C program, collection of all the keywords, identifiers, operators, special symbols, constants, strings and data values are called as tokens.

Let us see the following C program:-

C program to print all the characters of C character Set

#include<stdio.h>

#include<conio.h>

int main()

 {

        int i;

        clrscr();

        printf(“ASCII  ==>  Character\n”);

        for(i = -128; i <= 127; i++)

           printf(“%d    ==>     %c\n”, i, i);

        getch();

        return 0;

}

In the above program 22 tokens are used.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contribute
close slider
present

Contribute and Win Exciting Prizes & Gifts



whatsapp

You can also send file via Whatsapp

+91 9155653926

If you have any year ,any subject,any semester question paper and other study materials please send us

अगर आपके पास किसी सेमेस्टर के किसी भी साल और किसी भी विषय का क्वेश्चन पेपर है और कोई अन्य पढाई सामग्री तो उसे हमलोगों को भेजे