Name: Sabin

Email:

Posts by Sabin:

    A small technical doubt in C Programming

    October 6th, 2010

    A Small technical doubt

    Reply if anyone knows

    This is a small pgm,Compile in gcc and see the result

    #include<stdio.h>
    #include<math.h>
    int main()
    {
    float a=0;
    printf(“\n %f \n”,a*-1);
    printf(“\n %f \n”,abs(a*-1));
    return 0;
    }

    I got the result as follows

    -0.000000

    -0.000000

    Why is it so?

    6 Comments "