else
{printf("\nHead");
do {printf("->%d",p->data); p=p->next;} while(p!=NULL);
printf("->End\n");
}
}
main()
{SLIST *head;
int a[N]={11,12,15,18,19,22,25,29};
head=creatlist(a);
printf("\nOutput from head:\n"); outlist(head);
printf("\nOutput from tail: \n");
while (head->next != NULL){
fun(head);
printf("\n\n");
printf("\nOutput from head again :\n"); outlist(head);
}
}
2.程序改错题
#include <stdio.h>
/************found************/
fun (char a)
{if (*a)
{fun(a+1);
/************found************/
printf("%c" *a);
}
}
main()
{char s[10]="abcd";
printf("处理前字符串=%s\n处理后字符串=", s);
fun(s); printf("\n");
}
3.程序设计题
16
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库等级考试上机题目(上课用)(16)在线全文阅读。
相关推荐: