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 explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
p*=(++q)++*--p when p=q=1 while(q<=6)
Add Two Numbers Without Using the Addition Operator
Explain what are the different file extensions involved when programming in c?
What is the use of function in c?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Was 2000 a leap year?
What does a function declared as pascal do differently?
What is the use of in c?
string reverse using recursion
How can I discover how many arguments a function was actually called with?
What is the use of define in c?
How can you increase the allowable number of simultaneously open files?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Describe static function with its usage?