C examples for Data Type:Type Cast
Type Casting from int to float
#include <stdio.h> int main()//ww w . j av a 2 s . c o m { int x = 12; int y = 5; float result = 0; result = (float) x / (float) y; printf("%f", result); }