Q4.Problem

Q.4.Why is this possible for example

1
2
3
4
5
6
  const int size=5;
int arr[size]={1,2,3,4};
int *p=arr;
int *q=&arr[0];//correct
int *q=arr[0];//wrong why pointing to a particular value you need adress more
//particualarly 
arr[0] is an int, not a pointer, hence you cannot assign it to a pointer directly.
Topic archived. No new replies allowed.