Re: printing values of "arrays of pointers"



On 6 May, 14:44, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
Nick Keighley said:

On 2 May, 14:44, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:

<snip>

Since arr_p[0] points to i, we're looking for the value of >
i. That value is indeterminate, because the object i never had a value
assigned to it.

not even in the for loop?

Oops - good spot - apologies to OP.

some languages make it UB to acces the for loop variable
outside the loop (I think- Pascal, Alogol-60 and Ada)
but I think it is guaranteed to point one past the end
of the array after exiting from a "normal" for-loop.
(I can't be arsed to define the exit value in Standarese).


--
Nick Keighley



.



Relevant Pages

  • Re: (OT) Request for prayers, etc. for BiL
    ... Between saving the world and having a spot of tea Ryan Elkins said ... for him and his wife, ... my apologies to those who find this request inappropriate. ...
    (rec.games.miniatures.warhammer)
  • Re: Object Orientated Programming Advice
    ... I've taken it upon myself to learn other languages ... 'OOPS' way of thinking ... entity and control classes, and I can get bits to work fine, but I ... that when I used sequential methods. ...
    (microsoft.public.dotnet.framework)
  • Re: Oops
    ... > klaus wrote: ... >> Oops.. ... wrong newsgroup. ... >> Apologies. ...
    (rec.skiing.alpine.moderated)
  • Re: Linux 2.6.14.5
    ... Oops, my apologies to all, just rebuilt kernel again (third time) ...
    (Linux-Kernel)
  • Yellow bubble dialogue box
    ... I'm no tecchie so apologies if my terminology is not spot on. ... We have recently installed a PC of software that need an agent "pushed" out ...
    (microsoft.public.windowsxp.print_fax)