Zaki Mirza’s Blog

Icon

… About software and beyond!

Quiz #3: What if there were no ‘if’?

Last monday i reached office pretty late since i had to attend my lectures at univ. There was a power fluctuation problem in the whole building and the MIS had requested everyone not to turn on their PCs. So most of the people were either chilling in their cabins chatting or had left. I hung out for a while with a bunch of senior FAST graduates discussing some tecchie gossip and then i moved to the break room. There were some other employees sitting there and were discussing a very thoughtful problem. The problem being my quiz number 3. Its goes something like this:

Given a language that does not have an IF construct, how do you go on about executing different code over a condition? For example call code-block A if condition C is true, and B is condition C is false.

The discussion was going on among some 4-5 employees and since they were pretty seniour to me, (me being just another intern) i was un-noticed. Anyways, have your say in it and ill answer this shortly from my own perspective. (maybe its one of those interview questions, but then again its intresting).

Filed under: programming, quiz , ,

Blog Stats

  • 55,498 landed here so far...

 

December 2009
M T W T F S S
« Jan    
 123456
78910111213
14151617181920
21222324252627
28293031  

tweet