4 ms·
Well, there is a difference between "format specifier" and "format string". The first argument to printf is the format string, the `%d` and `%s` type things are
by cldr 13y ago
Well, there is a difference between "format specifier" and "format string". The first argument to printf is the format string, the `%d` and `%s` type things are the format specifiers. I was talking about this
printf("Hi", 45);
which will not segfault. If you meant
printf(45);
Then you are absolutely correct, that would segfault on common machines.
- comex 13y agoDeleted my comment because you are, of course, correct. (However, I do suspect rayiner was referring to omitting the format string.)
- cldr 13y agoI think so too, I just have bad reading comprehension and should have known but didn't.
- Danieru 13y agoI think that must be it. And it makes perfect sense how he would hit it. Example: http://ideone.com/MilaUN http://ideone.com/MilaUN