Typecasting Secret

code:

#include<stdio.h>
int main()
{

    int a=5,b=2;
    float r;
    char ch=5;
    r=(float)a/b;
    printf("%f",r);

    return 0;
}

Typecasting follows a hierarchy like this it is upper to lower is increasing and lower to upper is decreasing:

char
int
long
float
double
long double

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *