Data Types in C Programming | Computer Science Notes

Data types in C Programming

The data type specifies the type of data to be used in a program. A data type consists of a

  • A set of data values
  • A set of operation that may be applied to the values

Some of the common data types in C Programming are:

  • Numeric integers
  • Numeric real
  • Character
  • Boolean (logical).

Numeric Integers:

Integers are the positive and negative whole number and zero (2,-4, 0). The positive integers are called natural numbers or ordinal values and are often written without the ‘+’ sign. The unsigned integers are 1,3,89, .. and the signed integers are +1, +40, -4 …. The negative integers must be signed to distinguish them from positive integers.

Numeric Real:

Real numbers include integer and fractions. These number 0, -0.5, 10, 13/5, 34.34 etc. are the real number. Positive real number may be represented in signed or unsigned forms but negative real number should be represented in signed form.            The usual way of representing real number is to write the number with the decimal point fixed in its correct position between the two appropriate digits for example 13.34, 343.33 etc. this is the fixed point representation. This representation becomes laborious when dealing with several very large or very small numbers.


Character contains any printable alpha-numeric character and other special character like #, @, $, %. Each character has its associated ordinal value corresponding to its position in the character set. Example ASCII ‘A’ has an ordinal value 65. A 7 (seven) bit code comprising 0’s and 1’s representing each character in the computer system. This 7-bit-code as a standard is called ASCII (American Standard Code for Information Interchange).


Boolean is the simplest data type of all which takes one of the two possible values at a time. Two values are “True” or “False”.

also read this “Click Here

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!