# C Brain Teasers: Integer printed as float not dicussed (page 8)

**URL:** <https://forum.devtalk.com/t/c-brain-teasers-integer-printed-as-float-not-dicussed-page-8/127255>\
**Category:** PragProg Customers\
**Tags:** suggestion, book-c-brain-teasers\
**Created:** [5 October 2023 07:43 UTC](https://forum.devtalk.com/t/c-brain-teasers-integer-printed-as-float-not-dicussed-page-8/127255 "2023-10-05T07:43:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![javimazzaf](https://forum.devtalk.com/letter_avatar_proxy/v4/letter/j/6bbea6/32.png) [@javimazzaf](https://forum.devtalk.com/u/javimazzaf)\
**Post date:** [5 October 2023 07:43 UTC](https://forum.devtalk.com/t/c-brain-teasers-integer-printed-as-float-not-dicussed-page-8/127255/1 "2023-10-05T07:43:59Z")

</div>

@dgookin

Suggestion: The fact that surprised me the most on this example is that formatting an integer as float (printf(“%f”, (int) 1)) printed 0.000000, and not the result of the integer division (5/4 = 1). Of course, the existing discussion is interesting and relevant, but I would, at least, make mention of this fact.

#book-c-brain-teasers
