Find the best solutions to your problems with the help of IDNLearn.com. Our platform is designed to provide reliable and thorough answers to all your questions, no matter the topic.

The commented line states that I have assigned a 2D array to a pointer but I want array of such pointers which could store numbers of 2D Array.

The Commented Line States That I Have Assigned A 2D Array To A Pointer But I Want Array Of Such Pointers Which Could Store Numbers Of 2D Array class=

Sagot :

It is impossible to store numbers or contents of 2D array to a pointer array.

How to store pointers in 2D Arrays?

Arrays and pointers are different data structure elements, and there is a limit to the operations that can be performed on both.

Having said that, it is impossible to store numbers or contents of 2D array to a pointer array.

The closest you can do, is to use the following declaration:

int *p[] = {(array-type [][number of columns]) {Array-content}}

Read more about arrays and pointers at:

https://brainly.com/question/17355709

#SPJ1

Answer:

Get the element => *( (int *)aiData + offset ); calculate offset => offset = (1 * coloumb_number)+ 2); Add offset in array base address => (int *)aiData + offset; //here typecast with int pointer because aiData is an array of integer Get the element => *( (int *)aiData + offset );