我要输入和输出字符串应该怎么改???

来源:百度知道 编辑:UC知道 时间:2024/05/03 01:35:13
#include "stdio.h"
#include "stdlib.h"
struct awp
{char name;
int a,b;
struct awp *next;
}*creat();

void main()
{struct awp *head,*pp;
head=creat();
for (pp=head;pp!=NULL;pp=pp->next)
printf("%c%d%d",pp->name,pp->a,pp->b);
}

struct awp *creat()
{struct awp *head=NULL,*tail=NULL,*p,*pp;
char name;
int a,b,size;
size=sizeof(struct awp);
scanf("%c%d%d",&name,&a,&b);
while (a!=0){
p=(struct awp *)malloc(size);
p->a=a;p->b=b;p->name=name,p->next=NULL;
if (head==NULL)
head=p;
else
tail->next=p;
tail=p;
scanf("%c%d%d",&name,&a,&b);}

return head;
}
我要输入和输出字符串应该怎么改???
我已经改了几天了,请各位高手帮下忙

#include "stdio.h"
#include "stdlib.h"
struct awp
{char name;
int a,b;
struct awp *next;
}*creat();

void main()
{struct awp *head,*pp;
head=creat();
for (pp=head;pp!=NULL;pp=pp->next)
printf("%c%d%d",pp->name,pp->a,pp->b);
}

struct awp *creat()
{struct awp *head=NULL,*tail=NULL,*p,*pp;
char name;
int a,b,size;
size=sizeof(struct awp);
scanf("%c%d%d",&name,&a,&b);
while (a!=0){
p=(struct awp *)malloc(size);
p->a=a;p->b=b;p->name=name,p->next=NULL;
if (head==NULL)
head=p;
else
tail->next=p;
tail=p;
scanf("%c%d%d",&name,&a,&b);}

return head;
}

我要输入和输出字符串应该怎么改??? 汇编 输入一个字符串,再把这个字符串输出。要怎么写??? 如何将字符串用指针数组输入和输出 JAVA 怎么在命令行中输入字符串数组,统计它们的个数后输出,要代码 怎么用c来编一个程序 输入一个字符串 输出其中的tab和space数 输入字符串,输出字符串长度,统计数字、大写字母和小写字母个数。输入非字母和数字的字符则结束 写一个函数,使输入的一个字符串按反序存放,在主函数中输入和输出字符串? 写一函数,使输入的一个字符串反序存放,在主函数中输入和输出字符串 VB判断输入字符串例如ADFDFP,FDSOWGDT,DSADT,SDFLSTP后应该输出的数字 我的声卡输出孔有点问题,能否把输入口改为输出口?能的话怎么改?