# C program of Address Calculation Sort

## Complete C program of Address Calculation Sort

```#include<stdio.h>
#include<stdlib.h>
#define MAX 100

struct  node
{
int info ;
};

int n,arr[MAX];
int large;

int hash_fn(int number);

main()
{
int i;
printf("Enter the number of elements in the list : ");
scanf("%d", &n);
for(i=0; i<n; i++)
{
printf("Enter element %d : ",i+1);
scanf("%d",&arr[i]);
}/*End of for */

for(i=0;i<n;i++)
{
if(arr[i] > large)
large = arr[i];
}

printf("Sorted list is :\n");
for(i=0;i<n;i++)
printf("%d  ",arr[i]);
printf("\n");
}/*End of main()*/

{
int i,k;
struct node *p;

for(i=0;i<=5;i++)

for(i=0;i<n;i++)
{
}

printf("\n");
for(i=0; i<=5 ; i++)
{
while(p!=NULL)
{
printf("%d ",p->info);
}
printf("\n");
}
printf("\n");
/*Taking the elements of linked lists in array*/
i=0;
for(k=0;k<=5;k++)
{
while(p!=NULL)
{
arr[i++]=p->info;
}
}

/*Inserts the number in sorted linked list*/
{
struct node *q,*tmp;
tmp= malloc(sizeof(struct node));
tmp->info=num;
/*list empty or item to be added in beginning */
{
return;
}
else
{