Type conversion in C

 Type conversion :- 

                            Type conversion is a process of converting data of one type into another type there are two type of the type conversion in C-programming.

1) Implicit type conversion (Automatic type conversion):-

It is automatically done by the system internally without programmer intervention. Usually in a mixed operand expression all the lower data type are converted to the higher data type in the expression.


int main()
int x=10;
float y=5.5;
double z;
printf(“Value of Z is %lf”,z);
return 0;

In this example all the values are converted into double automatically by the system.

2) Explicit Type conversion:-

It is specifically written by the programmer in his code.


int main()
int x;
float y;
y=(float)10/3; // Type conversion
printf(“x=%d n”,x);
return 0;

Recommended Post:

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

Key points:-



Leave a Reply

Your email address will not be published.