Array mem assignment

Feb 27, 2013 at 12:25pm
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 Feb 27, 2013 at 12:25pm
Feb 27, 2013 at 1:39pm
how to make rx point to 15th location rx.

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