Why won't THIS work? (2)

new topic     » topic index » view thread      » older message » newer message

I have the sequence real with real[3] = 6.000000. When I use printf() to print i
t as a floating number it displays correctly.

printf(1, "%f", real[3]) gives
6.000000

BUT when I give this command:
printf(1, "%d", real[3]) I get
5 as the output.

Does anyone know why this occurs and what I can do about it?

|**************************************|
|          Joseph Martin               |
|    http://sailfish.exis.net/~jam/    |
|**************************************|

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu