Re: multidimensional arrays and pointers
- From: "bjrnove" <bjrnove@xxxxxxxxx>
- Date: 30 May 2005 23:52:41 -0700
> what is the difference between,
> (arr + 1) and
this gives you the address of the second element in the array. It's the
same as: &(arr[1])
> *(arr + 1)
This gives you the insides of the second element in the array. It's the
same as: arr[1]
You could also do like this:
*(*(arr + 1) + 1)
This should return 'e'. This is the same as: arr[1][1]
--
bjrnove
.
- References:
- multidimensional arrays and pointers
- From: junky_fellow
- multidimensional arrays and pointers
- Prev by Date: Re: size of pointer variables
- Next by Date: Re: [links, FAQ] multidimensional arrays and pointers
- Previous by thread: multidimensional arrays and pointers
- Next by thread: Re: [links, FAQ] multidimensional arrays and pointers
- Index(es):
Relevant Pages
|