Explain your own answer with proper example?
type casting is converting one datatype into another data type. There are teo types of type casting.
1) implicit typecasting
It is done automatocally by the compliter .Programmer doesnt worry about it. when the existing datatype size is less that than the desired datatype,then this typecasting is done. eg if int datatype variable want to change into float. int takes 2 bytes and float takes 4 bytes. So 4 < 2.and it is done implicitly
2) Explicit
eg let float datatype variable wants to change into int.
float a;
int b;
b=int(a)//i want to assign value of a to b.