code fragments for C, C++, Objective C and C#