the variable limits : Variable « Language Basics « C / ANSI-C

C / ANSI-C
1. assert.h
2. Console
3. ctype.h
4. Data Structure Algorithm
5. Data Type
6. Development
7. File
8. Function
9. Language Basics
10. Macro Preprocessor
11. Math
12. math.h
13. Memory
14. Pointer
15. setjmp.h
16. signal.h
17. Small Application
18. stdio.h
19. stdlib.h
20. String
21. string.h
22. Structure
23. time.h
24. wctype.h
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C / ANSI-C » Language Basics » VariableScreenshots 
the variable limits
the variable limits

/*Finding the variable limits  */
#include <stdio.h>
#include < limits.h >   /* For limits on integer types        */
#include <float.h>      /* For limits on floating-point types */

void main()
{
  printf("char store values from %d to %d", CHAR_MIN, CHAR_MAX)
  
  printf("\n unsigned char store values from 0 to %u", UCHAR_MAX);
  
  printf("\n short store values from %d to %d", SHRT_MIN, SHRT_MAX);
  
  printf("\n unsigned short store values from 0 to %u", USHRT_MAX);
  
  printf("\n int store values from %d to %d", INT_MIN, INT_MAX);
  
  printf("\n unsigned int store values from 0 to %u", UINT_MAX);
  
  printf("\n long store values from %d to %d", LONG_MIN, LONG_MAX);
  
  printf("\n unsigned long store values from 0 to %u", ULONG_MAX);

  printf("\n\n smallest non-zero value of type float is %.3e", FLT_MIN);
  
  printf("\nThe size of the largest value of type float is %.3e", FLT_MAX);
  
  printf("\nThe size of the smallest non-zero value of type double is %.3e",
                                                        DBL_MIN);
  printf("\nThe size of the largest value of type double is %.3e", DBL_MAX);
  
  printf("\nThe size of the smallest non-zero value of type long double is %.3e",
                                                       DBL_MIN);
  printf("\nThe size of the largest value of type long double is %.3e\n",
                                                        DBL_MAX);
}



           
       
Related examples in the same category
1. demonstrate the use of variables
2. For and scanf
3. Finding the size of a typeFinding the size of a type
w__w__w___._j__ava2___s.c___om | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.