Glitch interview question

Implement a function that takes in two unsigned integers and returns a boolean indicating whether you will have overflow if they are added together. Language of your choice.

Interview Answer

Anonymous

31 Oct 2012

if( a + b < a ) return true; return false;