语法*第九章*1 结构体指针定义及使用

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

 

posted @ 2018-04-30 10:00  sunnybowen  阅读(560)  评论(0编辑  收藏  举报