3 回答

TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊
子表達(dá)式的評(píng)估順序,包括
函數(shù)調(diào)用的參數(shù)和
運(yùn)營(yíng)商(例如,操作數(shù)+,-,=,*,/),以下除外:
二進(jìn)制邏輯運(yùn)算符(&&和||),
三元條件運(yùn)算符(?:),以及
逗號(hào)運(yùn)算符(,)
是未指定
例如
int Hello()
{
return printf("Hello"); /* printf() returns the number of
characters successfully printed by it
*/
}
int World()
{
return printf("World !");
}
int main()
{
int a = Hello() + World(); //might print Hello World! or World! Hello
/** ^
|
Functions can be called in either order
**/
return 0;
}
- 3 回答
- 0 關(guān)注
- 622 瀏覽
添加回答
舉報(bào)