In what way is that a signed char? The numeric value is a float, and the string value would require Unicode.
Richie Sevrinsky |
December 04, 2011 at 03:06 PM
LOL! HAhaha. Very impressive :-D
December 05, 2011 at 03:21 AM
Maybe just the lack of my first coffee (6:16 CET), but how could 3/4 be represented as a char? ^^;
Anyway the joke is a good one ^^
December 05, 2011 at 06:18 AM
Signed char?! It should be a signed double because of the value assignment.
December 05, 2011 at 11:37 AM
to complete the joke, the value can not be 3/4 as this would be 0.75 (a value that can not be stored in a signed char).
If the math compare value would be any value between 0>255 it would be fine.
Offtopic: thanks for your work I enjoy them.
December 05, 2011 at 08:10 PM
Shouldn't variable "a" be a signed float? The char is 8 bits and can contain only whole numbers only.
Chris B. |
December 06, 2011 at 08:47 PM
Maybe the pun becomes more obvious when describing the "-a" as a "signed character"...
(And because the joke works on a purely symbolic level, it really doesn't matter whether it would be coercing a float value. But I agree that the "3/4" fraction value distracts a little from the actual joke.)
December 09, 2011 at 07:42 AM
I think that's totally correct. The young geek is not talking about the value that is stored in 'a' but about 'a' itself. 'a' is a character (therefor a "char") and has a minus in front of it (therefor "signed")
--> signed char
December 09, 2011 at 03:54 PM
Well, 'a' is a char ... and it has a sign. A signed char. The teacher never asked about the 3/4.
December 09, 2011 at 06:28 PM
He doesn't know the answer so he sees the a with a minus in front - voila that's a signed char ;-)
(the way I see this joke)
December 10, 2011 at 10:14 AM
I agree with wolf :P it's definitely a signed char... lol :P
December 12, 2011 at 08:45 PM
3/4 is not seen as 0.75, but '3','/','4'.
it should have been a string
March 04, 2012 at 05:42 AM
¾ is UTF 00BE.
March 18, 2012 at 12:32 AM
The comments to this entry are closed.
I'm a IT-guy in Hamburg, Germany