order of evaluation of function parameters
问题 What will be printed as the result of the operation below: x=5; printf("%d,%d,%d\n",x,x<<2,x>>2); Answer: 5,20,1 I thought order is undefined yet I found above as interview question on many sites. 回答1: From the C++ standard: The order of evaluation of arguments is unspecified. All side effects of argument expression evaluations take effect before the function is entered. The order of evaluation of the postfix expression and the argument expression list is unspecified. However, your example