Array mem assignment

hi, i have little confuse between pointer and array. Below my code is shown
int main()
{
int rx[32],i;
int *p;
p=rx;
printf("rx : %x\n",rx);
printf("p : %x\n",p);
rx=(rx+15);//showing error
printf("rx+15 : %x\n",rx);
p=p+15;
printf("p+15 : %x\n",p);
return(0);
}

p=rx and px+=15 is ok because p is a pointer but rx=rx+15 this line showing an error. So how to make rx point to 15th location rx. kindly anyone tell me...
Last edited on
how to make rx point to 15th location rx.

rx is not a pointer, it can't point anywhere.
According to the C/C++ Standards
Objects of array types cannot be modified
Last edited on
Topic archived. No new replies allowed.