0 votes
in General Knowledge by (744k points)
How do I access a specific nested array element?

1 Answer

0 votes
by (744k points)
 
Best answer
Compute the address to the desired row
arr + (desired row # elements in row type size)

Compute the offset within the row to the desired element
(desired element * type size)

Add #1 and #2; result is address of designed element
arr + (desired row # elements in row type size) + (desired element * type size)
Welcome to the Answerine , a great place to find, read and share your favorite questions and answers.
...