Learn C The Hard Way
“Learn C The Hard Way will fill in the “beginning programmer” gap in the literature on the C Programming language. It will teach good modern C programming practices and avoid habits that lead to buffer...
View ArticleObject-oriented programming in C
Yes, it’s possible. See Axel-Tobias Schreiner’s book on this topic. Source code of the book is here. Links Phil’s guide to object-oriented ANSI C Can you write object oriented code in C? @ SO Object...
View Articleclang: a C language family frontend for LLVM
“Clang is considered to be a production quality C, Objective-C, C++ and Objective-C++ compiler when targeting X86-32, X86-64, and ARM… If you are looking for source analysis or source-to-source...
View ArticleGenerate random numbers deterministically and non-deterministically
Problem I wanted to compare the efficiency of some sorting algorithms. For this, I wrote a simple program that accepts a command-line parameter (the name of a sorting algorithm) and calls the specified...
View ArticleBinary representation of an int in C
Problem You want to visualize the binary representation of an int in C. Solution #include <stdio.h> #include <stdlib.h> #include <limits.h> char * int2bin(int i) { size_t bits =...
View ArticleDark corners of C
A Quiz About Integers in C “The C language’s rules for integer operations have some quirks that can make even small programs behave in confusing ways. This post is a review of these rules in the form...
View ArticleC gibberish ↔ English
See http://www.cdecl.org/. Examples: int *p declare p as pointer to int int *p[] declare p as array of pointer to int int (*p)[] declare p as pointer to array of int Discussion @reddit.
View ArticleThe “Clockwise/Spiral Rule” of C
There is a technique known as the “Clockwise/Spiral Rule” which enables any C programmer to parse in their head any C declaration. Here it is: http://c-faq.com/decl/spiral.anderson.html.
View ArticleIDE for C under Windows
Problem A friend of mine asked me to help him in C programming. He has Windows. What IDE to use? Solution Code::Blocks is an excellent choice. It has an installer that also contains a C compiler....
View Article
More Pages to Explore .....