Codeforcoding

Data type in C programming language

Data type in C programming language

In this tutorial, we will discuss Data type in C programming language

In this topic, we will learn about data type and how to use  in the C programming language.

Typically, data types is an important concept in a programming language such as Java, C++, Python……

It is essential to declare the data type in order to allocate the memory for programming purpose

Each variable is associated with data types and every data type allocates different amounts of memory to perform their specific operations.

 

 

Data type in C programming language
C programming data types

Data types in C language

Primitive data types

int- integer type

Integer data type is used to declare  whole number(no decimal value) that can have zero or positive or negative value

Example

0,8,-5

float and double– floating point type

float data type is used to declare  decimal numbers(no whole value) that can have positive and negative value

Example

Example

23.34, -5.34

 

char- Character types

Example

‘A,’,   ‘c’

 

Void – void data type

Void is a data type(it is also keyword) means No value or nothing. it is mosly used in function identification for not return anythig.

You can not create a variable as void type

 

Derived data type

The derived data type is used for a special purpose, which means, it is grouped of primary data types for a special purpose. These will be discussed clearly later

Catogory of data types

[wp_table id=9821/]

 

Basic Data Types

[wp_table id=9819/]

 

Suggested for you
C programming variables
C operator
C keywords
Cpp programming variables and types
Python Programming language Data types
Exit mobile version