语法*第九章*5 结构体指针作为函数参数

Posted sunnybowen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了语法*第九章*5 结构体指针作为函数参数相关的知识,希望对你有一定的参考价值。

#include<stdio.h>
struct student{
   int num;
   char name[20];
   float score;
} stu={112301,"bowen1",20};
void print(struct student *p);
 int main(void){
  print(&stu);
}
void print(struct student *p){
  printf("%d %s %0.1f",p->num,p->name,p->score);
}

 

以上是关于语法*第九章*5 结构体指针作为函数参数的主要内容,如果未能解决你的问题,请参考以下文章