Guys, i have 2 doubts
Does it mean that
1)I have an array of 10 pointers, that means, each of them is capable of holding an address OR
2)I have a single pointer that points to an array holding 10 integers
I too, feel , the first is correct, after all, since an array is contiguous memory locations, it doesnt matter whether ur array is of 10-integers or 1000 integers. But in many places, i saw the opposite.
Ok, just in case, the answer happens to be 1 itself, then please tell me whether a concept like 2 exists and when do we need it.
My doubt arose, cuz when i did
int* p; int* q; p=q;
(assume q was holding some address ), it worked
But when i did,
int* a; a=q;
(assume q was holding some address ), it DOESNT WORK
Why Why Why ???? a is also a pointer right ? which means a is also capable of holding the address of an int right ?