C-program-

Please check the attach file for more details.