Data Types in C Language

Estudies4you
Data Types
The C language has defined a set of types that can be divided into four general categories:
void, integral, floating-point and derived.

Void type:
The void type, designated by the keyword void, has no values and no operations, although having no values and operations might seem unusual, the void type is a very useful data type.

Integral type:
The C language has three integral types: Boolean, character and integer. Integral types can not contain a fraction part, they are whole numbers.

Boolean:
Boolean type can represent only two values, true or false.
The boolean type, which is referred to by the keyword bool, is stored in the memory as 0(False) or 1(True).

Character:
A character is, any value that can be represented in the computers alphabet, or as it is better known as, its character set. The C standard provides two character types: char and wchar_t(wide character type).

Integer:
An Integer type is a number without a fraction part
C supports four different sizes of the integer data type: short int, int, long int and long long int.

Floating-point Types:
There are three floating point types: real, imaginary and complex. There is a standard library, float.h, for the floating point values.
Real:
The real type, holds values that consist of an integer and a fractional part. There are three different sizes of real types: float, double and long double.
Imaginary type:
C, defines an imaginary type. An imaginary number is used extensively in mathematics and engineering. An imaginary number is real number multiplied by the square root of -1(sqrt of -1). The imaginary type, like the real type, can be of three different sizes: float imaginary, double imaginary and long double imaginary.
Complex:
C defines a complex type, which is implemented by most compilers. A complex number is a combination of a real and an imaginary number, The complex type, like the real type, can be of three different sizes: float complex, double complex and long long complex.
JNTUH R16 Computer Programming in  C Syllabus,jntuh Computer Programming in  C study material for civil,r16 Computer Programming in  C study material,Computer Programming in  C lecture notes,Computer Programming in  C course file,Computer Programming in  C co po mapping,Computer Programming in  C course outcome,Computer Programming in  C course overview,Computer Programming in  C unitwise notes pdf,Computer Programming in  C for engineering,jntuh Computer Programming in  C class room notes pdf,Computer Programming in  C previous question papers pdf,Computer Programming in  C notes with real time examples, jntuh cpds lecture notes pdf,jntuh c language notes pdf,jntu c language study material, c programming notes pdf,c programming lecture notes pdf, c programming study material pdf,c programming previous question papers pdf

The following table shows all valid data type combinations supported by C, along with their minimal ranges and typical memory size.
JNTUH R16 Computer Programming in  C Syllabus,jntuh Computer Programming in  C study material for civil,r16 Computer Programming in  C study material,Computer Programming in  C lecture notes,Computer Programming in  C course file,Computer Programming in  C co po mapping,Computer Programming in  C course outcome,Computer Programming in  C course overview,Computer Programming in  C unitwise notes pdf,Computer Programming in  C for engineering,jntuh Computer Programming in  C class room notes pdf,Computer Programming in  C previous question papers pdf,Computer Programming in  C notes with real time examples, jntuh cpds lecture notes pdf,jntuh c language notes pdf,jntu c language study material, c programming notes pdf,c programming lecture notes pdf, c programming study material pdf,c programming previous question papers pdf

Derived:
Array, pointer, structure and enumeration are called derived data types in C language
Array- a finite sequence of variables of the same data type.
Structure- a collection of related variables of the same or different data types.
Pointer- It is a variable which contains the address of another variable in memory.
Enumeration- An enumeration consists of a set of named integer constants.
It allows a programmer to define their own data type. Keyword enum is used to defined enumerated data type.

To Top