Giter Club home page Giter Club logo

static-hash-in-c's Introduction

static-hash-in-C

Example of a static hash in C using a static array. Tested on Ubuntu 16.4 , Mint 17, Android 9. 
This code is free.

The CODE sets up 1 array with the input to be hashed and another array dedicated to the hash keys.
The first array is read using a loop to compute the hash or each array index to assign.
It then stores the input string in the array using the hash/array index.

This code will print all the hash keys -> hash index numbers first so you can see what each string was hashed to.
Then it will print the search for the string "DEBUGOFF" which yields the hashed string "DOF"
To compile:
$ gcc staticHashc.c 

Output:
$ ./a.out
ZERO_IDX->652
+->44
-->46
*->43
/->48
PUSH->324
POP->242
DUP->236
DROP->313
BYE->227
HALT->301
WORDS->404
DEBUG->364
DEBUGOFF->586
PRINTPROG->718
DUMPSYM->566
SWAP->319
CR->151
CLEAR->364
DEBUGOFF -> DOF

static-hash-in-c's People

Contributors

elahtrebor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.