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
Write a program to reverse a string.
What is a floating point in c?
What is the 'named constructor idiom'?
What is the use of function overloading in C?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Using which language Test cases are added in .ptu file of RTRT unit testing???
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
Why do we use c for the speed of light?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is pointer and structure in c?
How is = symbol different from == symbol in c programming?
What is the difference between the local variable and global variable in c?
What does d mean?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?