News for hackers. Stuff that matters.
Re:Solutions to Integer Overflow by thewisenerd on Saturday September 03, 2016 @01:18PM (#12420012)
Before going to solutions, people need to be made aware of it first.

Take any "introduction to programming" course, and it is likely to include a question on: "swap two variables without using a third variable". When basic algebra is the simplest way to solve it, you also need to point out of the obvious case of integer overflow.

When I asked my professor why I wasn't graded for using the XOR-swap for solving that question, his reply was "we do not expect students to know this".

There are no comments on this comment yet.