Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

how to create and allocate memory for hash table

Posted on 2010-11-13
Last Modified: 2012-05-10
How to create and allocate memory for hash table in C language/
Question by:woeishyong
  • 2
  • 2
LVL 37

Accepted Solution

TommySzalapski earned 250 total points
ID: 34128535
It's a hash table so just make an array and hash for the index.

int hashtable[256];

Open in new window

void Hash(int* hashtable, int numToHash)
  hashtable[numToHash%256] = numToHash

Open in new window

If you need more help, provide more details.
LVL 40

Assisted Solution

evilrix earned 250 total points
ID: 34128640
>> How to create and allocate memory for hash table in C language/
Dynamically? Use malloc & free.

LVL 53

Expert Comment

ID: 34130075
This looks like a duplicate of http://www.experts-exchange.com/Programming/Languages/C/Q_26612981.html
Since duplicate questions are not allowed, please delete one of them, and only keep the one where you want to continue.
LVL 37

Expert Comment

ID: 34130799
I'm guessing he wanted to ignore the other one since he posted it in the wrong area. Must not have known we could move it for him.
LVL 40

Expert Comment

ID: 34824219
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question