C Programming Reference


C Programming Reference >> C Basic Tutorials >> C Keywords Home >>

signedui

30/12/06 -  Views - Ratings :   3.48 of 5 / 155 Votes   

 

It is a type modifier applicable to int and char data type. It tells the compiler that first bit of the data type is sign bit which tells wether the number is positive or negative. Int is signed by default while char is unsigned by default. Signed variables have half the range of those of unsigned varaibles but can distinguish between positve and negative numbers.

Code -
void function (void)
{
signed int a = 10;
signed int b;
b = scanf ("%d", &b);
printf ("%d %d",a, b);
}

Back To Top


      

 

 

© 2006 cencyclopedia.com