Type Casting In C rogramming | C Program For Type Casting -99webcode

Type Casting In C rogramming  | C Program For Type Casting-99webcode

       
   
Type Casting In C rogramming  | C Program For Type Casting



#include<stdio.h>

int main()

{

//float a;

int x=10;

int y=3;

float c;


c=x/y;

printf("%f\n",c );   // it will print result of integer type


c=(float)x/y;

printf("%f\n",c);//it will print integer type of result into float type of result

        return 0;

}


Post a Comment (0)
Previous Post Next Post