EOF output using% f
2 answers
Using an invalid format specifier for any particular argument in printf()
causes undefined behavior .
EOF
has a type int
. You can only use %d
for variable type int
.
FWIW, if you want floating point representation int
you need a cast
variable (but I personally recommend avoiding this)
printf("%f",(float)EOF);
+5
source to share