#include<stdio.h>
#include<malloc.h>
struct Student
{
int sid;
int age;
};
struct Student * CreatStudent(void);
void ShowStudent(struct Student *);
int main (void)
{
struct Student *ps;
ps=CreatStudent() ;
ShowStudent(ps);
return 0;
}
struct Student * CreatStudent(void)
{
struct Student * p=(struct Student * )malloc(sizeof(struct Student));
p->sid=99;
p->age=88;
return p;
}
void ShowStudent(struct Student *pst)
{
printf("%d %d", pst->sid,pst->age);
}
#include<malloc.h>
struct Student
{
int sid;
int age;
};
struct Student * CreatStudent(void);
void ShowStudent(struct Student *);
int main (void)
{
struct Student *ps;
ps=CreatStudent() ;
ShowStudent(ps);
return 0;
}
struct Student * CreatStudent(void)
{
struct Student * p=(struct Student * )malloc(sizeof(struct Student));
p->sid=99;
p->age=88;
return p;
}
void ShowStudent(struct Student *pst)
{
printf("%d %d", pst->sid,pst->age);
}