Using the integer conversion specifiers : Integer Family « Data Type « C Tutorial






#include <stdio.h>

int main()
{ 
   printf( "%d\n", 455 );
   printf( "%i\n", 455 );  /* i same as d in printf */
   printf( "%d\n", +455 );
   printf( "%d\n", -455 );
   printf( "%hd\n", 32000 );
   printf( "%ld\n", 2000000000 );
   printf( "%o\n", 455 );
   printf( "%u\n", 455 );
   printf( "%u\n", -455 );
   printf( "%x\n", 455 );
   printf( "%X\n", 455 );
 
   return 0;

}
455
455
455
-455
32000
2000000000
707
455
4294966841
1c7
1C7








2.7.Integer Family
2.7.1.Integer family
2.7.2.Float family (real numbers with decimal points)
2.7.3.Integer data type storage allocations
2.7.4.Using the integer conversion specifiers
2.7.5.Printing an unsigned integer in bits