sample C code for struct by value