How does this C program work? main(_){_^448&&main(-~_);putchar(--_%64?32|-~7[__TIME__-_/8%8][">'txiZ^(~z?"-48]>>";;;====~$::199"[_*2
Continue ReadingC Programming Tips
C is one of the most important and widely used of all programming languages. It is a powerful language that can be used not only to build general-purp
Continue ReadingImprove INSERT-per-second performance of SQLite?
Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts-per-second to over 96 000 inserts-per-second! Back
Continue ReadingWith C arrays, why is it the case that a[5] == 5[a]?
As Joel points out in Stack Overflow podcast #34, in C Programming Language (aka: K & R), there is mention of this property of arrays in C: a[5] =
Continue ReadingBest C Questions
[pt_view id="73f49b1b41"]
Continue ReadingWhy doesn’t GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?
I am doing some numerical optimization on a scientific application. One thing I noticed is that GCC will optimize the call pow(a,2) by compiling it in
Continue ReadingWhat is “:-!!” in C code?
I bumped into this strange macro code in /usr/include/linux/kernel.h: /* Force a compilation error if condition is true, but also produce a resul
Continue Reading