Type conversation and casting
Type conversation and type casting :- (i). Type Conversion. :- The type conversion is the process of converting a data value from one data type to another data type automatically by the compiler. Sometimes type conversion is also called implicit type conversion. The implicit type conversion is automatically performed by the compiler. For example, in c programming language, when we assign an integer value to a float variable the integer value automatically gets converted to float value by adding decimal value 0. And when a float value is assigned to an integer variable the float value automatically gets converted to an integer value by removing the decimal value. To understand more about type conversion observe the following... int i = 10 ; float x = 15.5 ; char ch = 'A' ; i = x ; =======> x value 15.5 is converted as 15 and assigned to variable i x = i ; =======> Here i value 10 is converted as 10.000000 and assigned to variable x i ...