CP - Cat 1 QB
CP - Cat 1 QB
9. Define type conversion? Give the difference between ITC and ETC (05 Marks)
The process of converting the data from one data type to another data type is called
Type conversion.
ITC ETC
1. It is performed by Compiler. 1. It is performed by programmer.
2. ITC performs only lower to 2. ETC perform both lower to
higher data conversion higher and higher to lower
3. ITC is performs when both the 3. ETC is performed when both the
operands are of different type. operands are of same type.
4. Example 4. Example
5. 2+3.4=5.4 a. float a=10.6 b. (int)a;
5. Ans:10