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

How to write a code for reverse of string without using string functions?

2088


formula to convert 2500mmh2o into m3/hr

949


Can you think of a logic behind the game minesweeper.

2423


What are header files and what are its uses in C programming?

1151


Which is better oop or procedural?

1004


Can you please explain the difference between strcpy() and memcpy() function?

1023


What are the types of macro formats?

1068


Can we change the value of static variable in c?

980


What is a program?

1197


What is the difference between variable declaration and variable definition in c?

1027


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2702


What is the difference between far and near in c?

1007


Hai what is the different types of versions and their differences

1903


What are loops in c?

961


What is variable in c example?

1004