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
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
In which header file is the null macro defined?
How can I avoid the abort, retry, fail messages?
What is pointer & why it is used?
write a progrmm in c language take user interface generate table using for loop?
Where can I get an ansi-compatible lint?
Explain how can I avoid the abort, retry, fail messages?
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
I need testPalindrome and removeSpace
#include
Explain what is dynamic data structure?
can any one provide me the notes of data structure for ignou cs-62 paper
What do you mean by a sequential access file?
What does c mean in standard form?
Explain how can I manipulate strings of multibyte characters?
Can you please explain the difference between malloc() and calloc() function?