Chinaunix首页 | 论坛 | 博客
  • 博客访问: 983810
  • 博文数量: 186
  • 博客积分: 10020
  • 博客等级: 上将
  • 技术积分: 1676
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-14 17:08
文章存档

2011年(5)

2009年(11)

2008年(2)

2007年(111)

2006年(57)

我的朋友

分类: LINUX

2007-01-26 11:09:24

#include
int main()
{
char *a[10];
printf("%d--%d--%d---%d\n",sizeof(a),sizeof(a[0]),sizeof(*a+1),sizeof(*a[10]));
return 0;
}
返回值:40--4--4---1
 
/******************************************************************************/
/******************************************************************************/
 
#include
typedef void PF(int);
void func(int fd)
{
        printf("hello jesse world=%d\n",fd);
}
void callo(PF *handler,int fd)
{
        handler(fd);
}
int main()
{
        callo(func,5);
}
 
/******************************************************************************/
/******************************************************************************/
 
#include
int function1(void)
{
        printf("function1=\n");
        return 0;
}
int (*fun2)();
void function2(int (*p)(void),int b)
{
        fun2 = p;
        printf("function2 zhixing \n");
}
int main()
{
        function2(function1,2);
        return 0;
}
/******************************************************************************/
/******************************************************************************/
阅读(1598) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~