Typecasting is a way to make a variable of one type, such as an int, act like another type, such as a char, for one single operation. To typecast something, simply put the type of variable you want the actual variable to act as inside parentheses in front of the actual variable. (float)a will make a as a float.
Without Type Casting
After Type Casting
It’s best practice to convert lower data type to higher data type to avoid data loss