链表

这里插入图片描述检查后
在这里插入图片描述打印出来乱码,咋该啊

#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;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值