C Programming Language

Cast operator

Cast operator can be used to explicitly convert the value of an expression to a different data type. To do so, the name of the data type to which the conversion is to be made is enclosed in parenthesis and placed directly to the left of the expression whose value is to be converted.Its general format is
(data type) expression


int i= (int)3.14;
float j= (float)10/2

Program :

Cast Operator
Unary operators Home Bitwise Operators
c program stats