小编kak*_*aka的帖子

如何从被调用的函数中更改调用函数中的变量?

如何try()修改函数(以及它的调用)以从下面的程序中获得11的输出?

#include <stdio.h>

/* declare try() here */

int main(void)
{
    int x = 10;
    try();              /* Call can change */
    printf("%d\n", x);
    return 0;
}

void try()              /* Signature can change */
{
    /* how to change x here?? */
}
Run Code Online (Sandbox Code Playgroud)

c

7
推荐指数
2
解决办法
2万
查看次数

标签 统计

c ×1