Wednesday, 1 August 2012

Token


  • Token:-
               In C-language, a source program consists of keywords, variables (or identifiers), constants, operators, punctuators etc. These elements of a program known as tokens.

  • For Example:-
                    main()
                    {
                          float temp, xy4;
                          xy4 = 10;
                          temp = xy4 + 10 * 2;
                    }


                 In the above program;

  1. ''main'' is a special identifier and temp, xy4 are variables.
  2. ''float'' is a keyword.
  3. The punctuators are; { , " , '' , ( , ) , ; , white spaces etc.
  4. The operators are : , = , *  , + , etc.

1 comment:

  1. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future...
    skinny fiber weight loss

    ReplyDelete