Re: pointer value



JD wrote:
>
> int (*a)[10];
> a++;
> what will be the value of a?

You answer this by considering what a is. It is a pointer to an
array of 10 ints. Since it is uninitialized, incrementing it (or
dereferencing it) results in undefined behavior.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson


.



Relevant Pages

  • Re: Looking for speed performance to draw line.
    ... each item in an array, that being the next and/or previous indexes. ... and it's next pointer to the previous item's original next pointer. ... Next -1, Prev 0 ... shapes up into shape classes that implemented the required commands ...
    (microsoft.public.vb.winapi.graphics)
  • Re: passing a string to a C++ function
    ... method to get a pointer into an array, since I assume that he was first to ... Loz. ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: simple pointer operations (newbe)
    ... Just to expand on that it should be pointed out that (amongst several ... A Perl array contains a C array that stores ... Pointer arithmetic on ... "Reply" at the bottom of the article headers. ...
    (comp.lang.perl.misc)
  • Re: Array of class and a pointer to it
    ... arrays, and pointing to the object. ... m_pMyClass is not a pointer, but an array. ... Prev by Date: ...
    (microsoft.public.vc.language)
  • Re: dynamically allocating a 2d array
    ... its first element. ... int (*array)[X] which is a pointer to an array of X integers. ... Prev by Date: ...
    (comp.lang.c)