Adding prob 7 in c.