examples for arrays, in C and in C++/C++11