📄 link4.c
字号:
/* Demo of using 2 methods to access static link. * * Written by Cyril Hu (cyrilhu@gmail.com), public domain. * */#include<stdio.h>#include<stdlib.h>typedef struct l { int sn; struct l *next;} L;int main(){ int i; L *p, *head; head = p = malloc(sizeof(L)*10); for(i=0; i<10; i++) { printf("%d ", p->sn = i); p->next = ++p; } p--, p->next = NULL; /* watch here */ puts(""); for(p=head; p; p=p->next) printf("%d ", p->sn); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -