#include #include #include struct node { int data; struct node *next; }; typedef struct node node; int n,*a; node *harr; int hashfn(int num) { return(num%10); } void hash() { int i,hi; node *harrvar,*newnode; node *harrtemp; for(i=0,harrtemp=harr;idata=*(a+i); harrvar->next=NULL; } else { while(harrvar->next!=NULL) harrvar=harrvar->next; newnode=(node *)malloc(sizeof(node)); newnode->data=*(a+i); newnode->next=NULL; harrvar->next=newnode; } } } int find(int num) { int i,hnum,noc; node *harrvar; hnum=hashfn(num); harrvar=(harr+hnum); for(noc=0;harrvar!=NULL;noc++) { noc++; if(harrvar->data==num) break; harrvar=harrvar->next; } return(noc); } void main() { int num,i,searchstatus; clrscr(); printf("\nEnter the no. of elements in the hash array: "); scanf("%d",&n); harr=(node *)malloc(sizeof(node)*10); printf("\nEnter the elements of the array: "); for(i=0;i