Q7: Classify C token and give one example each.

A7: C Tokens are the smallest element of a program, which one is meaningful to the compiler.

Classification of C tokens:

 

1.      Keywords e.g. (int, if, main, etc.).

2.      Identifier e.g. (int number, float average, etc).

3.      Constant e.g. (const float PI = 3.14, #define GST 12, etc).

4.      Operator e.g. (+, ==, &&, etc).

5.      String e.g. (char name = “Jonas”, char sName[10], etc).

6.      Special Symbol e.g. (#, &, ;, etc). 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.