0 votes
by (1.3k points)
What is pointer to array explain with example?

1 Answer

0 votes
by (1.4k points)
Pointer to an array is also known as array pointer. We are using the pointer to access the components of the array. int a[3] = {3, 4, 5 }; int *ptr = a; We have a pointer ptr that focuses to the 0th component of the array.Jun 13, 2019');})();(function(){window.jsl.dh('26','');})();(function(){window.jsl.dh('_cpagYPK7FMXH-wT4qYXoDw43','
');})();(function(){window.jsl.dh('28','
It is legal to use array names as constant pointers, and vice versa. Therefore, *(balance + 4) is a legitimate way of accessing the data at balance[4]. In the above example, p is a pointer to double which means it can store address of a variable of double type.

Related questions

0 votes
1 answer
asked Jul 14, 2021 by pointers (160 points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jun 26, 2021 by pointertoarray (120 points)
0 votes
1 answer
asked May 26, 2021 by arraysize (120 points)
0 votes
1 answer
0 votes
1 answer
asked Feb 6, 2020 by joystick (640 points)
0 votes
1 answer
...