函数调用顺序 [英] Order of function calling
本文介绍了函数调用顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么将在下面的前pression函数调用顺序:
What will be the order the function calls in the following expression:
a = f1(23, 14) * f2(12/4) + f3();
是否依赖于编译器?
Does it depend on the compiler?
推荐答案
每个操作数的计算顺序为未指定 C和C ++,这意味着,你的情况,函数调用的顺序的未指定的按本标准。
Order of evaluation of each operand is unspecified in C and C++, which means, in your case, the order of function calling is unspecified as per the Standards.
请注意,这是的未指定的不可以 实现定义的
这篇关于函数调用顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文