Re: Output of the printf(a,*a,**a) where a is of type int [][][]
CBFalconer said:
> Keith Thompson wrote:
>>
> ... snip ...
>>
>> Yes, the program exhibits undefined behavior, and yes, that
>> absolutely should be fixed, but that doesn't actually explain
>> the behavior, and there is another explanation. There's
>> nothing wrong with pointing out the undefined behavior *and
>> then* answering the original question.
>
> Undefined behaviour can do _anything_.
Agreed, but there's nothing wrong with pointing out the undefined behaviour
*and then* answering the original question.
> No explanation is needed.
The OP needed an explanation. The fact that his program was flawed does not
change this.
--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
|