Tokens:

In C programming punctuation, KeyWords, Characters and etc are called Tokens.

 

3e868 tokens bmp 300x147

KeyWords:

Keywords are words that can not be used as a variable name, keywords meaning is already defined by the compiler.

example:

Int, float are some example for keywords,  we can not use these keywords as a variable name. Hope that you may ask what is Variable? here we have a tutorial for Variables.

There are 32 keywords in C Programming Language,Here is the list of 32 keywords

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

These KeyWords are also called as Reserved words,if you use these keywords as variable name, compiler will throw error.

DataTypes:

  In C Programming Language DataType refers to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted.

example:

int a;

a is variable.

Here int is a Datatype, which tells the compiler that how much space needs for this integer variable.

Type Storage size Range
char 1 byte -128 to 127 or 0 to 255
unsigned char 1 byte 0 to 255
signed char 1 byte -128 to 127
int 2 bytes  -2,147,483,648 to 2,147,483,647
short 2 bytes -32,768 to 32,767
float 4bytes +/- 3.4e +/- 3

 

Leave a Reply

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