[offtopic] C programming newsgroup
Dan Sommers
me at privacy.net
Tue Sep 21 20:22:03 EDT 2004
On Tue, 21 Sep 2004 11:38:47 -0700,
Scott David Daniels <Scott.Daniels at Acm.Org> wrote:
> Cameron Laird wrote:
>> ... even *mention* > of "C/C++" seems capable of inciting lawsuits
>> over there.
> I couldn't pass this up:
> Generally the answer is 1 for integer types and 1.0 for floating point
> types. However, you can run into troubles dividing by 0.
> { int C = 5; printf('int: C/C++ = %d', C/C++); }
> { double C = 3.1415; printf('double: C/C++ = %d', C/C++); }
> ...
I'm pretty sure that "C/C++" invokes the dreaded Undefined Behavior, so
all bets are off. The folks in comp.std.c will have more details.
Regards,
Dan
--
Dan Sommers
<http://www.tombstonezero.net/dan/>
Never play leapfrog with a unicorn.
More information about the Python-list
mailing list