Assignment 7 Question 2
#include <stdio.h> #include <stdlib.h> struct node { int data; struct node *next; }; typedef struct node NODE; int main() { NODE *head=NULL; NODE *tail=NULL; int a,n; scanf("%d",&a); while(a!=-1) { NODE *s; s=(NODE *)malloc(sizeof(NODE)); s->data=a; s->next=NULL; if(head==NULL) { head=s; tail=s; } else { tail->next=s; tail=s; } scanf("%...