Floating Point Issues - Programming

Q1:

What will be the output of the program?
#include<stdio.h>
int main()
{
    float fval=7.29;
    printf("%d\n", (int)fval);
    return 0;
}

A 0

B 0.0

C 7.0

D 7

ANS:D - 7

printf("%d\n", (int)fval); It prints '7'. because, we typecast the (int)fval in to integer. It converts the float value to the nearest integer value.