Synopsys Interview Question

basic verilog, c programing,and some puzzles