- /*/////////////////////////////////////////////////////////////////////////////
- 文件名:函数指针
- 时间:2011/9/18
- /////////////////////////////////////////////////////////////////////////////*/
- #include<stdio.h>
- /*/////////////////////////////////////////////////////////////////////////////
- 函数名:main
- 函数功能:主函数
- 入口参数:
- 出口参数:
- /////////////////////////////////////////////////////////////////////////////*/
- void main()
- {
- struct student
- {
- int number;
- int *name;
- char sex;
- int age;
- float score;
- };
- struct student stu;
- stu.number=1234;
- stu.name="wangtao";
- stu.sex='m';
- stu.age=20;
- stu.score=89.0;
- printf("%d\n",stu.age);
- printf("%s\n",stu.name);
- printf("%d\n",stu.number);
- printf("%c\n",stu.sex);
- printf("%f\n",stu.score);
- }
|