Advertisements
Advertisements
Question
Explain the term type casting.
Answer in Brief
Solution
This method of type conversion allows users to transform one data type to another based on their choices. This indicates the user expects the system to return the desired data type.
Example:
int a, b;
float x = (float) a + b;
shaalaa.com
Is there an error in this question or solution?
Chapter 1.03: Values and Data Types - EXERCISES [Page 33]