小编San*_*ede的帖子

为什么我的程序从右到左评估参数?

我正在学习C,因此尝试了以下代码,并获得了7,6而不是的输出6,7。为什么?

#include <stdio.h>
int f1(int);
void main()
{
    int b = 5;
    printf("%d,%d", f1(b), f1(b));
}
int f1(int b)
{
    static int n = 5;
    n++;
    return n;
}
Run Code Online (Sandbox Code Playgroud)

c function-call order-of-execution

6
推荐指数
1
解决办法
159
查看次数

标签 统计

c ×1

function-call ×1

order-of-execution ×1