Saturday, February 28, 2009

Codeplay

int a;
int p = 100;a = p/*2;
printf("%d",a);

What's a?(C code)

Answer is that the code doesn't compile!

In a debugging contest I was organising, most people got that one wrong! It's basic stuff, but its so basic, most people don't recognize. I didn't spot it at first either. The whole contest thing was a very different experience for me at that point. I guess I had forgotten how much I enjoyed solving problems before I was bogged down by stupid details in life.  I realised what I had missed. Codeplay.

No comments:

Post a Comment