Saturday, May 16, 2020

Example 2

#include<stdio.h>
int main()
{
    float f = 10.4;
    float g = 12.3;
    int result;
    result = (f < g) ? 1 : 0;
    printf("%d",&result);
}

what is the output of the above code?

No comments:

Post a Comment

Exploring float data type in C

Float is one among the basic data type in C.  Floating point numbers in C has precision up to 6 decimal places.  T he header file float.h de...