FREE TUTORIALS ON C programming

Saturday, December 21, 2013

Date type modifiers allow us the change the context in which we use variable

Different types of data modifiers

SHORT - when variable type is preceded with the short modifier all it means that it reduces the amount of data that can be stored in a variable. Now you all might be thinking why do we need to attach short modifier
well when we declare any variable it is a place holder and depending upon the type of variable it has the some definite space allocated in the computer memory , preceding the variable name with short modifier we can reduce the the amount of space as a result we can reduce the amount  of data that we can store in the variable,well you might think why do we need to restrict ourself by reducing the amount of data that we can store in the variable , one reason for doing this is for effeciency (for example. if you have created a variable to store age of a person in that case if we declare a variable as integer it can hold approx 4 billion possible number , considering an int to be 32 bit.well we don;t need that much bigger space just to store a age of a person)



LONG -when the variable type is preceded with the long modifier all it means is that it increase the space available to store data in a variable.


SIGNED - signed modifier indicates that a variable can hold both positive as well as negative numbers

UNSIGNED - unsigned modifiers indicates that a variable can hold only positive values






8:09 PM   Posted by Unknown with No comments

0 comments:

Post a Comment

Bookmark Us

Delicious Digg Facebook Favorites More Stumbleupon Twitter

Search