码迷,mamicode.com
首页 > 其他好文 > 详细

结构体初始化及定义1

时间:2018-04-30 11:49:42      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:div   class   printf   初始化   name   nbsp   color   stdio.h   void   

#include<stdio.h>
struct student{
   int num;
   char name[20];
   float score;
};
 int main(void){
   struct student s1={20,"bowen",89.0};
   printf("%d %s %f",s1.num,s1.name,s1.score);
}

 

结构体初始化及定义1

标签:div   class   printf   初始化   name   nbsp   color   stdio.h   void   

原文地址:https://www.cnblogs.com/sunnybowen/p/8973029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!