堆栈实现字符串的反置.docVIP

  • 0
  • 0
  • 约小于1千字
  • 约 3页
  • 2018-04-22 发布于河南
  • 举报
堆栈实现字符串的反置

/***************************************** 程序介绍:用栈的结构实现对输入字符串的反置 完成人:Mao yanfeng of lanzhou university ******************************************/ #includestdio.h #includemalloc.h #define LEN sizeof(struct string) struct string { char string; struct * next; }; void main() { struct string *top,*buttom,*p1; char string1; int i; p1=top=buttom=(struct string *)malloc(LEN); buttom-next=NULL; printf(please input string:\t); string1=getchar(); buttom-string=string1; i=string1; while(i) { top=(struct string *)malloc(LEN); top-next=p1; p1=top; string1=getchar(); to

文档评论(0)

1亿VIP精品文档

相关文档