C TYPECASTING

  • Typecasting allows us to convert one data type into another.
  • In C language, we use the cast operator for typecasting which is denoted by (type).

Syntax:

(type_name)value;      

EXAMPLE:

#include<stdio.h>  
int main(){  
float f= (float)9/4;    
printf("f : %f\n", f );    
return 0;  
}