sizeof float (3.0) vs (3.0f)

Posted by kumar on Stack Overflow See other posts from Stack Overflow or by kumar
Published on 2009-08-31T00:56:22Z Indexed on 2010/05/29 20:32 UTC
Read the original article Hit count: 182

Filed under:
|

Hi,

What is the difference between sizeof(3.0) and sizeof(3.0f)

I was expecting both of them to give the same result (sizeof float)..but its different.

In 32 bit machine,gcc compiler, sizeof(3.0f) =>4 sizeof(3.0) => 8

Why so?

© Stack Overflow or respective owner

Related posts about c

    Related posts about sizeof