c code with data structures