标签:pre 函数声明 输出 eof 算法基础 code 算法 style return
1 #include<stdio.h> 2 #include<malloc.h> 3 struct student{ 4 int age; 5 }; 6 struct studnet * createStudent();//函数声明,创建学生年龄 7 void showstudent(struct studnet *);//函数声明,输出学生年龄 8 int main(){ 9 strunct student * ps; 10 ps = createStudent(); 11 showstudent(ps); 12 return 0; 13 } 14 struct studnet * createStudent(){ 15 struct studnet * p = (struct student *)malloc(sizeof(struct student)); 16 p->age=19; 17 return p; 18 } 19 void showstudent(struct studnet *pst){ 20 printf("%d",pst->age); 21 }
标签:pre 函数声明 输出 eof 算法基础 code 算法 style return
原文地址:https://www.cnblogs.com/sunbr/p/11256129.html