检查后
打印出来乱码,咋该啊
#include<stdio.h>
struct Teacher
{
long int num;
char name[40];
char sex[4];
char unit[60];
char howhere[60];
long int call;
long int wage;
long int phfee;`
long int watfee;
long int hofee;
long int rax;
long int restfee;
long int vonfee;
long int subsidy;
long int lifsub;
long int paywage;
struct Teacher*next;
};
int main()
{ struct Teacher a,b,c,*head,*p;
a.num=001;a.name[40]="我爱罗";a.sex[4]="男";
a.unit[60]="长春市第一小学" ;a.howhere[60]="音忍村";
a.call="13426635909";a.wage=100000;a. phfee=200;a.watfee=500;
a.hofee=0;a.rax=5000;a.restfee=3000;a.vonfee=10000;a.subsidy=50000;
a.lifsub=0;a.paywage=110300;
b.num=002;b.name[40]="九尾金狐";b.sex[4]="男";
b.unit[60]="长春市第一小学" ;b.howhere[60]="火影村";
b.call="13626535989";b.wage=150000;b. phfee=300;b.watfee=500;b.hofee=0;
b.rax=8000;b.restfee=5000;b.vonfee=15000;b.subsidy=100000;b.lifsub=0;
b.paywage=221200;
c.num=003;c.name[40]="蒙娜丽萨";c.sex[4]="女";
c.unit[60]="长春市第一小学" ;c.call="13856693589";
c.howhere[60]="火影村";c.wage=150000;a. phfee=300;c.watfee=500;c.hofee=0;
c.rax=8000;c.restfee=5000;c.vonfee=15000;
c.subsidy=100000;c.lifsub=0;c.paywage=221200;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do
{
printf("%d%s%s%s%s%d%d%d%d%d%d%d%d%d%d%d\n",
p->num,p->name,p->sex,p->unit,p->call,p->howhere,p->wage,p->phfee,
p->watfee,p->hofee,p->rax,p->restfee,p->vonfee);
p=p->next;
}
while(p!=NULL);
return 0;
}