GithubHelp home page GithubHelp logo

pombredanne / c_snippets Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mkollaro/c_snippets

0.0 0.0 0.0 355 KB

Various C learning projects and snippets

License: Apache License 2.0

Makefile 6.46% C 77.12% Shell 16.42%

c_snippets's Introduction

C Code Fragments

This project contains my experiments and exercises in C, as well as various snippets that I might re-user later. Some of them are back from the times when I was just learning C, thus they might not be of the highest quality.

Contents:

  • hash table that compiles into both a static library (htable.a) or a shared one (htable.so)
  • wordcount program that counts word frequency using the above hash table
  • a very limited re-implementation of the UNIX program tail (has a fixed limit of how long an input line can be)

Usage:

You will need the gcc compiler and build tools, which you can get by running on Debian-based systems like Ubuntu:

$ sudo apt-get install build-essential

Afterwards, just run:

$ make
$ make tests  # you will need `valgrind` and `cppcheck` for this

Program usage examples:

$ cat tests/files/wordcount_simple2.txt| ./wordcount
1 elephant
2 giraffe
5 cow
3 dog

$ ./tail -3 tests/files/book.txt
including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how to
subscribe to our email newsletter to hear about new eBooks.

c_snippets's People

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.