Difference between Type Conversion and Type Casting

Type Conversion is that which converts to data type into another for example converting a int into float converting a float into double . The Type Conversion is that which automatically converts the one data type into another but remember we can not  store a large data type into the other for example we can't store a float into int because a float is greater than int.

When a user can convert the one data type into then it is called as the type casting Remember the type Conversion is performed by the compiler but a casting is done by the user for example converting a float into int Always Remember that when we use the Type Conversion then it is called the promotion when we use the type casting means when we convert a large data type into another then it is called as the demotion when we use the type casting then we can loss some data.

0 comments:

Copyright © 2013 SoftKul