Code:void createList() { struct node *ptr, *tmp; int classList, i, head; head = (struct node *)malloc(sizeof(struct node)); if(head == NULL) { printf("Unable to locate list."); exit(0); } printf("Enter total number of list: \n",); scanf("%d", &classList); head -> classList; head -> next = NULL; tmp = head; for(i=2; i<=n; i++) { printf("Unable to allocate memory"); exit(0); } printf("Enter total number of list %d:", i); scanf("%d", &classList); ptr -> studentData = classList; ptr -> next = NULL; tmp -> next = ptr; tmp = tmp -> next; }