Type conversion in C Programming
Implicit Type conversion
Explicit Type conversion
- Explicit type conversion is also known as type casting.
- In Type casting, the user is responsible for the conversion of one type of datatype to another specific datatype.
- The generel form of Type casting is (type-name)expression
- type-name may be any of standard data types in c such as int, float, char.
- expression may be a constant, variable or expression.
Examples
- sum=int(num1+num2)
- sum=int(num1)+num2