code samples in C/C++