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
What is string in c language?
How can a string be converted to a number?
How do you define structure?
How is actual parameter different from the formal parameter?
Is c is a high level language?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What are shell structures used for?
What is modeling?
What is function prototype in c with example?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What is sizeof c?
Can the size of an array be declared at runtime?
What is the size of structure pointer in c?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Why C language is a procedural language?