Problem with printf()
Doug Gwyn
gwyn at smoke.ARPA
Sat Oct 8 11:11:16 AEST 1988
In article <504 at imec.UUCP> croes at imec.UUCP (Kris Croes) writes:
> printf("%d %f\n",i,i); /*1*/
>Some tests (e.g. printing on several lines) showed that the problem is
>caused by printing the float under the "%d" format. I know that
>normal people don't do such a thing, but that is no reason for printf()
>to mess up the stack. (???)
It wasn't printf that messed up the stack,
it was you -- by not meeting the requirements
for using printf.
The arguments MUST match the corresponding
conversion specifiers in the format string.
More information about the Comp.unix.wizards
mailing list