Problem Description
输入N个整数,按照输入的顺序建立单链表存储,并遍历所建立的单链表,输出这些数据。
Input
第一行输入整数的个数N;
第二行依次输入每个整数。
Output
输出这组整数。
Sample Input
Sample Output
Hint
不得使用数组!
Source
10 | struct node *head , * p ,*q; |
11 | head =( struct node*) malloc ( sizeof ( struct node )); |
18 | p = ( struct node*) malloc ( sizeof ( struct node )); |
19 | scanf ( "%d" , &p->data); |
27 | printf ( "%d" , q->data); |
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)