Thursday, September 23, 2010

Declaring a Variable in C

The basic syntax for declaring a variable in C is 

                                datatype variablename
Datatype stands for the type of data of the variable it can be an integer,floating point value ,character etc.


The basic thing to understand is datatype specifies the the type of your variable whether it is a number,name or any other type of data.
                                                                                     

The primary data types in C are                                                     

1.

Integer

int

2.

Character

char

3.

Floating Point

float

4.

Double precision floating point

double

5.

Void

void


The range of values which these data types can take are given below in the table

Datatype

Range

char

-128 to 127

Int

-32768 to +32767

float

3.4 e-38 to 3.4 e+38

double

1.7 e-308 to 1.7 e+308



No comments:

Post a Comment

Which is the Best Photo Watermarking Software

Photo Theft is becoming more and more common in the web with the outburst of social websites like Facebook,Google Plus and Image sharing se...