c code generator for query 6 fixed, the rest of queries need more work