[NSRCA-discussion] Chapter-12 computer science.

Keith Black tkeithblack at gmail.com
Wed Jul 4 09:02:34 AKDT 2007


Guys! You're getting carried away almost as bad as the judging controversy!
;-)

I think you're missing the point. This was a trick question to see if you'd
catch the fact that cnt was defined as 8-bits (char) and therefore would
never reach 256. That was the only point of the quiz.

Keith

----- Original Message ----- 
From: "Matthew Frederick" <mjfrederick at cox.net>
To: "NSRCA Mailing List" <nsrca-discussion at lists.nsrca.org>
Sent: Wednesday, July 04, 2007 12:45 AM
Subject: Re: [NSRCA-discussion] Chapter-12 computer science.


> Well, num increments before cnt does, so num would reach 256 as well,
given
> the right data type... I still don't like the example, I hate the thought
of
> using characters for numbers. Just seems silly to me. Then again, it's the
> exact kind of thing my old computer science teacher would have put on a
test
> just to mess with everyone. Then again he would throw something in there
> that looked like nothing but a string of ampersands and asterisks with a
> one-letter variable at the end and ask if it was a pointer or not... he
was
> kind-of nuts.
>
> Matt
>
> ----- Original Message ----- 
> From: "Martin X. Moleski, SJ" <moleski at canisius.edu>
> To: "NSRCA Mailing List" <nsrca-discussion at lists.nsrca.org>
> Sent: Wednesday, July 04, 2007 12:33 AM
> Subject: Re: [NSRCA-discussion] Chapter-12 computer science.
>
>
> > Matthew Frederick wrote:
> >
> >> I was thinking the same way you were, Marty, but according to the guy
who
> >> posted it, its an infinite loop. Also, if our thinking on the way it
> >> would
> >> operate was correct, the value of cnt at the end would be 256 (since it
> >> increments before the condition is tested)...
> >
> > OK, I agree that cnt is incremented to 256 if it is
> > the right type to do so.
> >
> > Seems to me num can only reach 255.
> >
> >> On a more personal note, I've
> >> been impressed to see a Jesuit who is into R/C airplanes. My brother
> >> joined
> >> the Novitiate in Grand Couteau, LA last August. He seems to be really
> >> enjoying it, and it looks like he's going to stay with it.
> >
> > It's a long haul.  I hope he does hang in there.
> >
> > Marty
> >
> > _______________________________________________
> > NSRCA-discussion mailing list
> > NSRCA-discussion at lists.nsrca.org
> > http://lists.nsrca.org/mailman/listinfo/nsrca-discussion
> >
>
> _______________________________________________
> NSRCA-discussion mailing list
> NSRCA-discussion at lists.nsrca.org
> http://lists.nsrca.org/mailman/listinfo/nsrca-discussion



More information about the NSRCA-discussion mailing list