Skip to main content

Thread: C: adding a printf changes the result???


hello people,

i've been coding in c 6 months. i'll i'm using program designed preform simulation of cells. i'll try skip on details. @ end of simulation form column structure thing , have calculate width , other statistics , put short output file.

typical output file looks this:
code:
  137.47    10.24   616.00    35.78    38.22    23.15
but this:
code:
472604372093897390883776495616.00 1494506247970435899442579111936.00   616.00    65.86      inf     -nan
i spent lot of time looking problem, found out if make printf statement prints value of divisor after division statement, works perfectly, , normal answer! happening?

quote posted tomkat3 view post
what happening?
you have bug in code.
if adding printfs fixed it, you're stepping on stack or freed memory.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk C: adding a printf changes the result???


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support