Programming Test
I stumbled across Part 6 of a Programming Job Interview Challenge on the Dev102 blog and thought, “hey, I know this!” I couldn’t help responding.
So the question was, given this bit of code, what will the output be?
1: ArrayList a = new ArrayList();
2: ArrayList b = new ArrayList();
3:
4: a.Add(1);
5: b.Add(1);
6: a.Add(2);
7: b.Add(2.0);
8:
9: Console.WriteLine((a[0] == b[0]));
10: Console.WriteLine((a[1] == b[1]));
Ok, so I’ll break the post here in case you want to work it out for yourself, but you should really go to the original post - not least because there are five other challenges there.