cp指令复制整个demo cp demo1 demo2
cp指令复制demo中的语句 复制 nyy 粘贴 p
vi 模式下删除光标所在向下n行 ndd
1 #include<stdio.h>
2
3 struct test
4 {
5 int data;
6 struct test *next;
7 };
8
9 void printLink(struct test *head)
10 {
11 struct test *point = head;
12 while(point !=NULL ){
13 printf("%d ",point->data);
14 point = point->next;
15 }
16 putchar('\n');
17 }
18
19 int main()
20 {
21
22 struct test t1 ={1,NULL};
23 struct test t2 ={2,NULL};
24 struct test t3 ={3,NULL};
25 struct test t4 ={4,NULL};
26 struct test t5 ={5,NULL};
27
28 t1.next =&t2;
29 t2.next =&t3;
30 t3.next =&t4;
31 t4.next =&t5;
32 // printf("%d %d %d\n",t1.data,t1.next->data,t1.next->next->data);
33 printLink(&t1);
34
35 return 0;
36 }