Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- /////////////////////////////////////
- struct T
- {
- int n;
- T *pNext;
- }t1, t2;
- T t3, t4;
- ///////////////////////////////////////////////
- int main()
- {
- T t5, t6;
- t1.n = 12;
- t1.pNext = &t2;
- t2.pNext = &t3;
- t3.pNext = &t4;
- t4.pNext = &t5;
- t5.pNext = &t6;
- T *p = &t1;
- for(int i = 0; i < 6; i++)
- {
- printf("%d, ", p->n);
- p = p->pNext;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement