Category: Data Types in C

Data Types in C

Integer max value with INT_MAX

Integer max value with INT_MAX

Whenever we have to find maximum and minimum limit of various Data types, we may use INT_MAX platform-dependent constants proposed by ANSI. So INT_MAX find out Constant Maximal value which can be stored in...

Storage classes in C

Storage classes in C

From C compiler’s point of view, a variable name identifies some physical location within the computer where the string of bits representing the variable’s value is stored. There are basically two kinds of locations...

Floats and Doubles

Floats and Doubles

A float occupies four bytes in memory and can range from -3.4e38 to +3.4e38. If this is insufficient then C offers a double data type that occupies 8 bytes in memory and has a...

Chars, signed and unsigned

Chars, signed and unsigned

Parallel to signed and unsigned ints (either short or long), similarly there also exist signed and unsigned chars, both occupying one byte each, but having different ranges. To begin with it might appear strange...

Integers, signed and unsigned

Integers, signed and unsigned

Sometimes, we know in advance that the value stored in a given integer variable will always be positive—when it is being used to only count things, for example. In such a case we can...

Integers, long and short

Integers, long and short

C offers a variation of the integer data type that provides what are called short and long integer values. The intention of providing these variations is to provide integers with different ranges wherever possible....

Data Variables and Constants

Data Variables and Constants

A computer, under the guidance of a program, can do many things. It can add numbers, sort names, command the obedience of a speaker or video screen, calculate cometary orbits, prepare a mailing list,...