Project 1 - Creation of user defined data type to implement the user interfaces for working with ‘Set’ (Mathematical Set theory) using Linked List
OVERVIEW OF THE PROJECT:
Main objective of project is mathematical set theory.There are many set theory concepts available,in this project has to do the union and intersection of list.For that create two list using linked list concept.Creating the list,first need to create a node using structure.Its has different data as a structure member and also creating node reference address using pointer.Here structure member name as structure name its called a self referential structure
IMPLEMENTATION OF INTERFACE FOR MATHEMATICAL SET THEORY USING C PROGRAMMING.
- For creating node as structure using user defined name and declare structure members. two data type one is integer value and another one address of the node using pointer variable(*).
- using function concepts write the following function insert, search, print list, union and intersection.
- creating the main function and we get the values of list 1 anf list 2 using the for loop and using the many function call in that.
and then we are creating the different functions what are mentioned in the main program.
KEY HIGHLIGHTS OF THE PROJECT:
Step1: New node in the size of list using malloc function. create the insert function for inserting the new node in the linked list. Linked list create by using for loop.
Step2:Insert function using arguments are head address and value from the user.
Step3:Entering the data in the data area and storing the address of the next node to the next pointer and we are storing the new node address in the head for the new node.
Step4:Create the function for union as findunion for LLone and LLtwo.use the temp variable and compare the two list and insert value in findunion and print the list using print function.
Step5: Create the function for union as findintersection for LLone and LLtwo. use the temp variable and compare the two list and insert value in common of both list and print the list using print function.
List One={1,2,4,5}
List Two={1,3,4,6}
Union ={3,6,1,2,4,5}
Intersection={1,4}
Output:
