View Single Post
  #2  
Old July 23rd 08, 10:50 PM posted to rec.aviation.piloting
Jim Logajan
external usenet poster
 
Posts: 1,958
Default What's the answer

Rod wrote:
Matt,

I guess I'm not a natural computer scientist, because I don't know the
answer. What is it? Note that some people do well in computer science
because they are very good in general quantitative skills, not
CS-specific skills. That might be lots of us.

Dad

23. If b is a Boolean variable, then the statement b := (b = false) has
what effect?


Looks like Modula/Pascal family of notation. I suspect it would have the
effect of confusing anyone not familiar with that language notation. ;-)

Other languages would use this notation:

b = (b == false)

Or in Python:

b = not b

that is the question....

(A) It causes a compile-time error message.
(B) It causes a run-time error message.
(C) It causes b to have value false regardless of its value just
before the statement was executed.
(D) It always changes the value of b.
(E) It changes the value of b if and only if b had value true just
before the statement was executed.

Only 5.4% of the students skipped the question. Of those who answered,
60% got it right. And getting this question right turned out to be a
predictor of success on most of the rest of the exam, including solving
complex problems like reversing


The suspense is killing me - reversing what, I wonder? Their flight path?