According to first law of thermodynamics dQ = dU + dW.......(i) As we know that, work done by the gas depends on the type of process, i.e. path and dU depends on the initial and final states. So, considering Eq. (i), dQ will also be dependent on path. It means that, in thermodynamics, heat and work are path functions.