Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision

Answer Posted / shanthi

2.

hash table is a table with one row with 10 columns say.
now to create hash table

struct phonerec
{
char name;
int phoneno;
};

struct node
{
struct phonerec r;
struct node *pnext;
};

struct node *hash[10];

int hashfun(int phoneno)
{
return phone%10;

}

int add(struct phonerec *pr);
{
struct node *pn;
pn = malloc(sizeof(*pn));
pn->r=*pr;
int hix=hashfun(pr->phoneno);
pn->pnext=hasharray[hix];
hasharray[hix]=pn;
return SUCCESS;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2037


What is static and auto variables in c?

1020


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1859


How can I find out the size of a file, prior to reading it in?

1097


Explain how to reverse singly link list.

1069


How does struct work in c?

1030


Implement bit Array in C.

1094


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1894


What are the types of macro formats?

1056


can anyone please tell about the nested interrupts?

2063


What are the advantages of using new operator as compared to the function malloc ()?

1266


Where in memory are my variables stored?

1111


What is wrong with this statement? Myname = 'robin';

1261


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

957


Can we use any name in place of argv and argc as command line arguments?

1009