#include<string.h> #include<stdio.h> struct node { int data; struct node *next; }; typedef struct node MODETYPE; main() { MODETYPE s1,s2,s3,*begin,*p; s1.data=100; s2.data=200; s3.data=300; begin=&s1; s1.next=&s2; s2.next=&s3; s3.next=NULL; p=begin; while(p) { printf("%d",p->data); p=p->next; } printf("\n"); }
P163~
时间: 2024-11-03 20:49:00