#include <stdio.h> struct node { int data; struct node *next; //指向本身的指针 }; // main() { struct node a,b,c,*h,*p;//定义结构体和结构体指针 a.data=10; //设置结构体变量的值 b.data=20; c.data=30; h=&a; //设置结构体指针的指向 a.next=&b; b.next=&c; c.next='
#include <stdio.h> struct node { int data; struct node *next; //指向本身的指针 }; // main() { struct node a,b,c,*h,*p;//定义结构体和结构体指针 a.data=10; //设置结构体变量的值 b.data=20; c.data=30; h=&a; //设置结构体指针的指向 a.next=&b; b.next=&c; c.next='