CPP Language / Type Casting

It is a process of converting one data type o other. It is of 2 types.

S.No Casting types Process of converting
1 Widening Casting Smaller data type to larger data types
Example int a = 5; double b = a;
2 Narrowing Casting larger data types to Smaller data type
Example double b = 5; int a = b;


Home     Back