Re: multidimensional arrays and pointers



> 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

.



Relevant Pages

  • Re: concatenating multiple matches?
    ... but to append the second element from each array that has as its first ... contains a product name and description (array). ... SKU1 BREADED ... SKU2 BREADED ...
    (comp.lang.perl.misc)
  • Re: array
    ... My second issue is that while the second element in my array is always ... workbook to a workbook with a specific name. ... The first thing is that I wanted it to copy the worksheets to the end of the ...
    (microsoft.public.excel.programming)
  • How can I recognise a <BR>
    ... I would like the first line of my string in the first element of the ... array, the second line in the second element and so on... ...
    (comp.lang.php)
  • How can I recognise a <BR>
    ... I would like the first line of my string in the first element of the ... array, the second line in the second element and so on... ...
    (comp.lang.php)
  • Re: Arrays
    ... > and in both cases I get an array access error ... > I am having problems understanding the syntax for the second element ... >> I can extract the base element of aArraybut not the second elements. ... >> Bob S. ...
    (comp.lang.clipper)