Integer Types: S.N - Types & Description
Integer Types: S.N - Types & Description
1 Basic Types
They are arithmetic types and are further classified into: (a) integer types
and (b) floating-point types.
2
Enumerated types
They are again arithmetic types and they are used to define variables that
can only assign certain discrete integer values throughout the program.
3
The type void
4 Derived types
They include (a) Pointer types, (b) Array types, (c) Structure types, (d)
Union types and (e) Function types.
The array types and structure types are referred collectively as the
aggregate types. The type of a function specifies the type of the function's
return value. We will see the basic types in the following section, where as
other types will be covered in the upcoming chapters.
Integer Types
The following table provides the details of standard integer types with their
storage sizes and value ranges –
#include <stdio.h>
#include <limits.h>
int main() {
When you compile and execute the above program, it produces the
following result on Linux −
Floating-Point Types
The following table provide the details of standard floating-point types with
storage sizes and value ranges and their precision −
The header file float.h defines macros that allow you to use these values
and other details about the binary representation of real numbers in your
programs. The following example prints the storage space taken by a float
type and its range values −
#include <stdio.h>
#include <float.h>
int main() {
return 0;
When you compile and execute the above program, it produces the
following result on Linux −
1
Function returns as void