首页 > 其他 > 详细

语法*第九章*6 结构体变量作为函数参数

时间:2018-05-01 21:17:10      阅读:166      评论:0      收藏:0      [点我收藏+]
#include<stdio.h>
struct student{
   int num;
   char name[20];
   float score;
} stu={112301,"bowen1",20};
void print(struct student stux);
 int main(void){
  print(stu);
}
void print(struct student stux){
  printf("%d %s %0.1f",stux.num,stux.name,stux.score);
}

 

语法*第九章*6 结构体变量作为函数参数

原文:https://www.cnblogs.com/sunnybowen/p/8977109.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!