标题:答案为什么是17?
取消只看楼主
wxz11191975
Rank: 1
等 级:新手上路
帖 子:98
专家分:0
注 册:2011-6-20
结帖率:85.29%
已结贴  问题点数:5 回复次数:1 
答案为什么是17?
#include <stdio.h>

funa(int a,int b) {return a+b;}
funb(int a,int b) {return a-b;}
sub (int (*t)(),int x,int y) {return (*t)(x,y);}

main()
{int x,(*p)(int,int);
p=funa;
x=sub(p,9,3);x+=sub(funb,8,3);
printf("%d\n",x);
system("PAUSE");
return 0;
}
对这个程序在函数的嵌套关系上的理解有点乱,不知道结果是如何得出来的。
搜索更多相关主题的帖子: include return system 
2011-07-07 07:59
wxz11191975
Rank: 1
等 级:新手上路
帖 子:98
专家分:0
注 册:2011-6-20
得分:0 
回复 2楼 icysky
谢谢,给你一说超简单 :)
2011-07-07 15:21



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-344912-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.796579 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved