#include <stdio.h>
print(int* a,int* b,int* c,int* d,int* e)
{
printf("\n%d %d %d %d %d\n",*a,*b,*c,*d,*e);
}
main()
{
static int arr[]={97,98,99,100,101,102,103,104};
int *ptr=arr+1;
print(++ptr,ptr--,ptr,ptr++,++ptr);
}
Output:
100 100 100 99 100
I am a little confused with the output. Is it because of the undefined evaluation order of function or there is something else that I am missing?