{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

puzzle_code - else printf"Single precision not...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* puzzle.c * Why does this C program behave the way it does? */ #define CVAL 0.1 #include <stdio.h> int main() { float q = CVAL; double dq = CVAL; if (q == CVAL) printf("Single precision: equal!\n");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: else printf("Single precision: not equal!\n"); if (dq == CVAL) printf("Double precision: equal!\n"); else printf("Double precision: not equal!\n"); return 0; }...
View Full Document

{[ snackBarMessage ]}