0 votes
by (160 points)
Can a pointer point to an array?

1 Answer

0 votes
by (1.3k points)
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
0 votes
1 answer
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)
...