Sunday, June 24, 2012

To familiar with various data types in C

#include<stdio.h>
#include<conio.h>
int main(void)
{
   printf("\nLower bound of char is %d",CHAR_MIN);
   printf("\nUpper Bound of char is %d",CHAR_MAX);
   printf("\nLower bound of int is %d",INT_MIN);
   printf("\nUpper Bound of int is %d",INT_MAX);
   printf("\nLower bound of long is %d",LONG_MIN);
   printf("\nUpper Bound of long is %d",LONG_MAX);
   printf("\nLower bound of unsigned char is %d",UCHAR_MIN);
   printf("\nUpper Bound of unsigned char is %d",UCHAR_MAX);
   printf("\nLower bound of unsigned int is %d",UINT_MIN);
   printf("\nUpper Bound of unsigned int is %d",UNIT_MAX);
   printf("\nLower bound of unsigned long is %d",ULONG_MIN);
   printf("\nUpper Bound of unsigned long is %d",ULONG_MAX);
   getch();
   return 0;
}


/***************************************************************
 *  YOU CAN ALSO CHECK RANGE OF OTHER DATA_TYPES like float,   *  
 *          double, long double by just entering               *

 *                                                             *
 *                 nameofdatatype_(MIN/MAX)                    *
 ***************************************************************/

0 comments:

Post a Comment