The introduction, a copy-paste from the above site, and the sample program to run through your compiler is below.

Introduction

You would think that the basic integer types provided by the C and C++ languages wouldn't cause an much confusion as they do. Almost every day there are posts in the C and C++ newsgroups which show that many newcomers do not understand them. Some experienced programmers who are only familiar with one platform do not understand them either.

The most common source of confusion are the sizes of the integer types, and the range of values which they can hold. That is because the languages leave many features of the integer types implementation-defined, meaning that it is up to the particular compiler to determine their exact specifications. C and C++ do set minimum requirements for each of the integer types, but the compiler is free to exceed these limits.

Each compiler is required to document its implementation. This information should be available in the printed manuals, online help, or man pages which come with the compiler.

In addition, there is a required standard header named &ltlimits.h> (&ltclimits> in newer C++ compilers) that provides information about the integer types that can be used in your programs at run time. A compiler is not required to provide a header like &ltlimits.h> as a readable text file, but I do not know of any compilers which do not.

There are programs on this page to display the information that this file contains.

About this Blog

In truth this is my personal documentation area where I hope to save myself time by documenting my home projects, work projects. I also hope to be able to provide others with a simple HOWTO guides, FAQs and other tidbits.