What is Type Cast Operator:
The float can be converted to integer value or an integer can be converted to float value using type cast operator.
avg = sum/(float)i; //Syntax in C
avg = sum/float(i); //Syntax in C++. This is like passing the identifier as argument in the function.
There are other type cast operators in C++ which will be discussed later.
· const_cast
· static_cast
· dynamic_cast
· reinterpret_cast