I was reviewing interview questions for a dev position and stumbled upon this question. What are your thoughts?

link|improve this question
3  
The correct response is "There are four lights!" youtu.be/3kmG7KXxShM – jfrankcarr Feb 2 at 1:49
2  
(2+2) mod 3 == 1. – S.Lott Feb 2 at 1:52
1  
True for base 3 or 4. – Hand-E-Food Feb 2 at 1:53
1  
This sounds like a job for xkcd: xkcd.com/169 – Ryan Culpepper Feb 2 at 2:09
4  
For sufficiently large (or small) values of 2... – Anna Lear Feb 2 at 3:42
show 5 more comments
feedback

closed as not constructive by Yannis Rizos, maple_shaft, Jonathan Khoo, World Engineer, Bernard Feb 2 at 3:38

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

4 Answers

In my opinion questions like that are aimed at how creative you can be with your answers.

  1. if you're adding the value of the character '2'
  2. if + operator is overloaded to do something else
  3. if 2+2 is a string and not an expression to be evaluated

you name it. :-)

link|improve this answer
Nice answer, programming related. – psr Feb 2 at 3:36
feedback

Because of miscibility, 2 liters of water mixed with 2 liters of ethanol produces 3.84 liters of mixture.

http://en.wikipedia.org/wiki/Ethanol

link|improve this answer
feedback

In the prime field GF3, 2 + 2 is 1, not 4. In fact, 4 doesn't even exist in GF3.

link|improve this answer
feedback

If the variables containing the Values of the 2's are floating point variables, their sum may not necessarily be 4.

link|improve this answer
2  
No, floating point arithmetic is precise for small integers (magnitude up to about 2^53 for doubles, IIRC). – Ryan Culpepper Feb 2 at 2:10
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.