http://create.stephan-brumme.com/
BIT manipulation
https://github.com/keonkim/awesome-bits bit manipulations
http://programming.sirrida.de/bit_perm.html
https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html
https://habrahabr.ru/company/mailru/blog/317180/
https://ccodearchive.net/list.html
https://vorpus.org/blog/why-does-calloc-exist/
http://antirez.com/picol/picol.c.txt
https://habrahabr.ru/post/325678/
Books
http://www.amazon.com/dp/0201498413 C Interfaces and implementations
https://anteru.net/blog/2016/05/01/3249/ Designing API in C
http://icube-icps.unistra.fr/index.php/File:ModernC.pdf
http://icube-icps.unistra.fr/img_auth.php/d/db/ModernC.pdf
Understanding and Using C Pointers by Richard Reese BOOK
http://c.learncodethehardway.org/book/ E-book
https://www.amazon.com/21st-Century-Tips-New-School/dp/1491903899 21st Century C (2nd edition)
https://www.cs.rit.edu/~ats/books/ooc.pdf OOP in C
https://leanpub.com/patternsinc Patterns in C
https://learncodethehardway.org/c/ Zen Shaw Learn C Hard Way
https://hintjens.gitbooks.io/scalable-c/content/preface.html
https://www.gitbook.com/book/hintjens/scalable-c/details
http://avxhome.se/ebooks/programming_development/c/14302640040.html Advanced Topics in C: Core Concepts in Data Structures by Noel Kalicharan
https://news.ycombinator.com/item?id=12920449
http://jlongster.com/Whats-in-a-Continuation
http://www.italiancpp.org/2016/11/02/coroutines-internals/
Memory
http://geocar.sdf1.org/alloc.html allocating memory
http://arjunsreedharan.org/post/148675821737/write-a-simple-memory-allocator
http://nethack4.org/blog/memory.html
http://lemire.me/blog/2016/04/20/no-more-leaks-with-sanitize-flags-in-gcc-and-clang/
.h HEADER
https://habrahabr.ru/post/280764/ header file
http://www.acodersjourney.com/2016/05/top-10-c-header-file-mistakes-and-how-to-fix-them/
https://brennan.io/2015/01/16/write-a-shell-in-c/
http://www.codingalpha.com/difference-between-call-by-value-and-call-by-reference-in-c/
https://habrahabr.ru/post/301332/
http://blog.regehr.org/archives/1393 Modern C resources
https://news.ycombinator.com/item?id=12182499
https://hackernoon.com/so-you-think-you-know-c-8d4e2cd6f6a6#.1x4dtyinv
https://habrahabr.ru/company/pvs-studio/blog/281719/
http://maxsi.org/coding/c-string-creation.html
http://www.hookatooka.com/wpc/
https://anteru.net/2016/05/01/3249/ design API in C
https://habrahabr.ru/company/inoventica/blog/275685/
https://habrahabr.ru/post/275823/
https://github.com/liteserver/binn serialization
https://github.com/Keith-S-Thompson/how-to-c-response
https://habrahabr.ru/company/inoventica/blog/276611/ how to c
http://www.catb.org/esr/structure-packing/
C
Arrays vs pointers in C https://blog.feabhas.com/2016/12/a-convenient-untruth/
https://github.com/btrask/stronglink/blob/master/SUBSTANCE.md
https://notabug.org/koz.ross/awesome-c
https://github.com/stevedonovan/llib
https://github.com/waruqi/tbox cross platform C libraries
https://news.ycombinator.com/item?id=10956748 open source C libraries
http://habrahabr.ru/post/257485/
https://medium.com/@CPP_Coder/about-size-t-and-ptrdiff-t-a1654234d842
http://jmoiron.net/blog/mmap2/ mmap
https://stackoverflow.com/questions/10950828/simulation-of-templates-in-c
http://theck01.github.io/offbrand_lib/
#define BUFSIZE 1024 int arr[BUFSIZE]; // Legal C and C++ int size; scanf("%d", &size); int arr[size]; // Legal C, not C++ vector<int> arr(size); // Legal C++
http://habrahabr.ru/post/256743/
http://www.cheatography.com/ashlyn-black/cheat-sheets/c-language/
https://www.duckware.com/bugfreec/index.html
http://nuclear.mutantstargoat.com/articles/pointers_explained.pdf
http://eternallyconfuzzled.com/Tutorials.aspx
web server in c with source code
#include <stdio.h>
double sum_of_squares(double **parr){
double result=0.0;
int i=0;
while ( parr[i] ){
result += (*parr[i]) * (*parr[i]);
i++;
}
return result;
}
int main(void){
double array[] = {1.0, 2.0, 3.0};
double *p_array[] = {NULL, NULL, NULL, NULL};
int len=sizeof(array)/sizeof(double);
int i;
for ( i=0; i<len; i++){
p_array[i]=&array[i];
}
double res = sum_of_squares( p_array);
printf("sum_of_squares=%f \n",res);
return 0;
}
https://github.com/andrewrk/malcheck
http://eli.thegreenplace.net/2009/10/21/are-pointers-and-arrays-equivalent-in-c
http://eli.thegreenplace.net/2010/04/06/pointers-vs-arrays-in-c-part-2d
https://www.youtube.com/watch?v=i7xribtttg4&feature=youtu.be Poiners and multidimen array
http://snaipe.me/c/c-smart-pointers/
http://eli.thegreenplace.net/2009/11/16/void-and-casts-in-c-and-c
http://nullprogram.com/blog/2010/02/18/
https://github.com/angrave/SystemProgramming/wiki
http://marek.vavrusa.com/c/memory/2015/02/20/memory/
http://locklessinc.com/articles/dlist/
http://habrahabr.ru/company/abbyy/blog/238739/ realloc
http://www.catb.org/esr/structure-packing/
https://news.ycombinator.com/item?id=9069031
http://pfacka.binaryparadise.com/articles/guide-to-advanced-programming-in-C.html
http://happybearsoftware.com/implementing-a-dynamic-array.html
http://vickychijwani.me/function-pointers-in-c-are-underrated/
http://blog.noctua-software.com/c-tricks.html
http://c.learncodethehardway.org/book/ex20.html
https://news.ycombinator.com/item?id=9043594
http://stackoverflow.com/questions/257418/do-while-0-what-is-it-good-for
http://ccodearchive.net/list.html
https://github.com/attractivechaos/klib hash
http://theck01.github.io/offbrand_lib/ datastructures in C
https://habrahabr.ru/post/324210/ std::vector in pure C
https://news.ycombinator.com/item?id=11277650
https://github.com/srdja/Collections-C
https://github.com/watmough/jwHash hash
http://hz2.org/blog/hash_table_in_c.html
https://github.com/clibs/clib/wiki/Packages
http://danluu.com/malloc-tutorial/
http://www.drdobbs.com/cpp/general-purpose-c-libraries-limited-opti/231000967
glib, apr, nspr
https://github.com/faragon/libsrt strings, vector, tree, maps, etc
DEBUG
http://maciejczyzewski.me/2015/02/21/better-debug-notices-in-c-using-macros.html
http://www.reddit.com/r/programming/comments/30wfgw/better_debug_notices_in_c_using_macros/
Preprocessor and Macros
http://sathyamvellal.in/blog/cool-c-programming/?d=5
http://habrahabr.ru/post/246971/
http://stackoverflow.com/questions/1067226/c-multi-line-macro-do-while0-vs-scope-block
http://www.pixelstech.net/article/1390482950-do-%7B-%7D-while-%280%29-in-macros
https://gustedt.wordpress.com/2011/02/02/handling-control-flow-inside-macros/
http://blog.pkh.me/p/20-templating-in-c.html
https://www.iar.com/support/resources/articles/advanced-preprocessor-tips-and-tricks/
https://news.ycombinator.com/item?id=11198333
#define ERR_CHK(call) errorCheck((call), __FILE__, __LINE__)
From here: http://vickychijwani.me/simplifying-memory-allocation-in-c/
Instead char *s = (char *) malloc(x*sizeof(char));
use this:
#define ALLOC(t,n) (t *) malloc((n)*sizeof(t))
Now you can use:
char *s = ALLOC(char,x)
#define OUTPUT(x) #x<<"= "<<(x)<<std::endl
cout <<OUTPUT(theta) <<OUTPUT(t) <<OUTPUT(cos(theta*t)) ;
#include <stdio.h>
#define debug_printf(x) printf("[%d, %s] %s", __LINE__, __FUNCTION__, (x))
int main() {
debug_printf("hello\n");
}
[6, main] hello // also there is __FILE__
http://sourceforge.net/apps/mediawiki/predef/index.php?title=Main_Page
http://www.antoarts.com/c-preprocessor-tricks/
http://www.mikeash.com/pyblog/friday-qa-2010-12-31-c-macro-tips-and-tricks.html
http://www.geeksforgeeks.org/archives/22027
http://cecilsunkure.blogspot.com/2012/08/generic-programming-in-c.html
The token pasting (##) operator simply eliminates any white space around it and concatenates (joins together) the non-whitespace characters together.
http://blog.aaronballman.com/2011/12/stupid-compiler-tricks/#more-457
http://cecilsunkure.blogspot.com/2012/08/generic-programming-in-c.html
http://molecularmusings.wordpress.com/2011/07/12/a-plethora-of-macros/
http://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html Variadic macros
Implementing C compiler