第一题:建立一个线性链表,其元素值为依次从键盘输入的正整数,以输入一个非正整数为结束,然后依次输出线性链表中的各元素值。 (课本 P23) 。#include “stdlib.h“#include “stdio.h“#define null 0#define size 6struct nodeint data;struct node * next;void main ()struct node * head;struct node * p,* q;head=(struct node *)malloc(size);p=head;q=(struct node *)malloc(size);scanf(“%d“,while (q-data!=0)p-next=q;p=q;q=(struct node *)malloc(size);scanf(“%d“,p-next=null;p=head;while (p!=null)printf(“%dn“,p-data);p=p-next;