O
onkar
void print(int *a,int *b,int *c,int *d,int *e){
printf("++ptr=%d\nptr--=%d\nptr=%d\nptr++=%d\n++ptr=%d
\n",*a,*b,*c,*d,*e);
}
int main(void){
static int arr[]={97,98,99,100,101,102,103,104};
int *ptr=arr+1;
print(++ptr,ptr--,ptr,ptr++,++ptr);
return 0;
}
gives me ::
++ptr=100
ptr--=100
ptr=100
ptr++=99
++ptr=100
I am totally foxed by this answer. Please try to explain why the
answer must be like that ??
printf("++ptr=%d\nptr--=%d\nptr=%d\nptr++=%d\n++ptr=%d
\n",*a,*b,*c,*d,*e);
}
int main(void){
static int arr[]={97,98,99,100,101,102,103,104};
int *ptr=arr+1;
print(++ptr,ptr--,ptr,ptr++,++ptr);
return 0;
}
gives me ::
++ptr=100
ptr--=100
ptr=100
ptr++=99
++ptr=100
I am totally foxed by this answer. Please try to explain why the
answer must be like that ??