function evaluation order in C -
this question has answer here:
#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 little confused output. because of undefined evaluation order of function or there else missing?
Comments
Post a Comment