On Sun, Dec 18, 2011 at 2:59 PM, Roy Smith <r...@panix.com> wrote:
> It is possible for 1 + "one" to be equal to 2 in C or C++.  All it takes
> is for the string literal to be located at memory location 1.  Not
> likely, but nothing in the language prevents it.

Not quite; 1 + "one" will be "ne", which might happen to be at memory
location 2. The data type is going to be char* (or, in a modern
compiler, const char*), not int. That said, though, I think that (in
this obscure circumstance) it would compare equal with 2. For what
that's worth. :)

ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to