News for hackers. Stuff that matters.
Re:So you think you know C? by kps on Tuesday November 08, 2016 @07:49PM (#12905284)
I've also personally encountered 24 for C. That's not the problem with (' '*13) here, though — C doesn't mandate ASCII.
Re:So you think you know C? by ekiru on Tuesday November 08, 2016 @08:25PM (#12905408)
char is also allowed to be a signed type, in which case overflow is undefined behavior.
Re:So you think you know C? by evincarofautumn on Tuesday November 08, 2016 @10:50PM (#12905914)
It’s not because of the signedness of char—not only do character literals have type int, but even if this weren’t a literal, the char would be promoted to (signed) int before the multiplication. But of course the multiplication of two ints can still overflow.