Skip to main content

C-TOKENS:


C-TOKENS:
            Each individual unit or element in a statement is called Token. C language contains different types of Tokens.

a. Identifiers
b. Variables
c. Data Types
d. Constants
e. Operators
f. Key Words
g. Delimiters

IDENTIFIERS:
In C-language names of variables, functions, labels and various other user-defined names or objects are called identifiers.

Rules for defining identifiers:

1. The first character must be an alphabet or an underscore, sub-sequent characters must be either letters, digits or underscore.
2. No space is allowed in between identifiers and no special characters are also allowed except underscore. 3. Key Words are not allowed as identifiers.
4. There is no limit of length of an identifier but some compilers will recognize only 8 or 32 characters.
Valid  Count1 , Test123 , Student_name Invalid  1count , 123test , Student-name

VARIABLES:
A variable is a data name that may be used to store a data value. A variable is a named location in memory that is used to hold a value that may be modified by the program. All variables must be declared before they can be used. The general syntax of declaration is

Syntax:  datatype variable list;
                Ex: int a,b,c;
                      float p,t,r;

VARIABLE INITIALIZATION:
            At the time of variable declaration we assign value to the variable is called variable initialization.

Ex:      int a;          variable declaration
           int a=10;    variable initialization

CONSTANTS:
Constant refers to fixed values that the program cannot alter. Constants can be any of the basic data types. Constants are also called “LITERALS”. There are 4 basic constants.They are
1. Integer Constants: Integer constants are specified as number without fractional components. Ex: 10, -20,
2. Floating Point Constants: Floating Point constants require the decimal point followed by the numbers fractional component. Ex: 11.23, -2.34 …
3. Character Constants: It is a single character enclosed in single quotes. Each character has an ASCII value to identify. Ex: ‘A’, ‘@’ , ….
 4. String Constants: A String is a set of characters enclosed in double quotes. Ex: “abc”, “c-language”, ….

 KEYWORDS:
Keywords are reserved words in C language. They have pre-defined meaning and are used for the intended purpose. Standard Keywords are


 auto                             const                                 int                          typedef 
break                            else                                  long                          switch 
case                              enum                               short                          union 
char                             extern                             register                      unsigned 
continue                       float                                signed                         void                                             default                         for                                  sizeof                         volatile  
do                                goto                                 static                          while 
double                         if                                       struct   

Comments

  1. Thanks a bunch for sharing this with all of us you actually know what you are talking about! Bookmarked. Kindly also visit my web site =). We could have a link exchange agreement between us! imac service berlin

    ReplyDelete

Post a Comment

Popular posts from this blog

Characteristics of computers

    Characteristics:        All computers have similar characteristics, which tells how computers are efficient to perform task. Computers have some Limitations also. Speed:     Computer can work very fast. It takes only few seconds for calculations on very large amount of data. Computer can perform millions (1,000,000) of instructions per second.      We measure the speed of computer in terms of microsecond (10-6 part of a second) or nanosecond (10 to the power -9 part of a second).   Accuracy:        The degree of accuracy of computer is very high and every calculation is performed with the same accuracy.  The errors in computer are due to human and inaccurate data.       The calculation done by computer are 100% error free, If we provide accurate input. Diligence:        A computer is free from tiredness, lack of concentration...

DS LAB FOR II YEAR

1.SINGLE LINKED LIST Procedure for creation of single linked list: STEP-1 : Declaring a variable named as “item”.Ie the element what we place in the linkedlist of the new node.         STEP-2 : Read the value   in “item”. Set first=last=null and next=null. STEP-3: Create a new node named as temp and assign the variable item to data part andassign Address of the node temp to null.       temp.data=item;       temp.next=null; STEP-4: Check   the address part of the first node Check if first=null Then assign first=last=temp Other wise Then assign the new node tolast.next=temp          last=temp STEP-6 : Repeat STEP-3 until you read required nodes. Procedure for display the linked list: STEP-1 : Check whether the list having nodes or not i.e Check if first=null        ...

LEVELS AND CURVES

LEVELS:                 Levels are used to set the shadows, mid tone etc.  O pen an image on Photoshop window. Select image menu on menu bar than adjustments than levels. A dialogue box will appear on screen which shows three pointers which indicates three optimum. The black triangle indicates shadows and gray triangle indicates mid tone and white triangle indicates highlights. In the channel menu different options are provided in drop down list. Make sure select on preview, which gives current adjustments on your picture. CURVES: Curves are to  similar to levels, it gives more power to control shadows highlights and mid tones. One of the simplest adjustment we can make with curves is increasing the contrast. Go to image menu and than adjustments,than curves. Dialogue box will appear on screen with straight diagonal line.      ...