#define NULL 0
#include
typedef struct point
{
int c;
struct point *next;
struct point *prior;
}node;
node * creat(node *head,int n)
{
node *p,*pt;
int i;
//p=(node *)malloc(sizeof(node));
//scanf("%d",&p->c);
scanf("%d",&head->c);
p=head;
pt=p;
i=1;
while(i
p=(node *)malloc(sizeof(node));
scanf("%d",&p->c);
p->prior=pt;
pt->next=p;
pt=p;
i++;
}
p->next=NULL;
return head;
}
void bianli(node *head)
{
node *p;
p=head;
printf("\n");
while(p!=NULL)
{
printf("%d ",p->c);
p=p->next;
}
}
int main()
{
node *head;
int n;
head=(node *)malloc(sizeof(node));
printf("input the size of linklist:");
scanf("%d",&n);
head=creat(head,n);
bianli(head);
getch();
}