VB Interview Question

This is one of the easy-level questions that I give my interview candidates on the written test part of the interview:

Assume that a and b are Integer variables.

i. If a And b Then Call DoSomething()
ii. If (a And b) = b Then Call DoSomething()

Statements (i) and (ii) are equivalent. True or False?


I thought this was a no-brainer, but apparently not. This is often the source of many bugs in VB code.

So how many of you think the answer is True? ;-)

3 comments:

Anonymous said...

Duh, what means "equivalent"?

Thanh Hai Tran said...

Oh God, please take me now!!!

Visitor,
Is it just a Façade, or are yer a really yanking me Chain of Command, man?

Are ya only a few global variables short of a Singleton?

Do I really need an Interpreter to talk to you?

Do I need to Decorate my question with different flavours before you can understand it?

How many times do I have to Iterate through the stupid question before I can get the right answer?

And finally, the $64,000 question: Do I really expect a VB developer to understand what the heck I just rambled out?

Yes!

Yeah, Gav--*you*, stop scaring them all away.

Yeah, Mark--at last, I've finally gone postal.

Good night, one and all.

Anonymous said...

:D