print the float value in integer in C language

Posted by amit singh on Stack Overflow See other posts from Stack Overflow or by amit singh
Published on 2009-10-27T16:33:29Z Indexed on 2010/04/03 22:03 UTC
Read the original article Hit count: 251

Filed under:
|
#include<stdio.h>
int main()
{
    float a=5;
    printf("%d",a);
    return 0;
}

This gives the output:

0

Why is the output zero?

© Stack Overflow or respective owner

Related posts about c

    Related posts about typecasting