Correct option is C
Heat capacity of a system is the change in internal energy with respect to temperature at constant volume.

In statistical thermodynamics, the internal energy is given by:

where q is the partition function.
KB is the Boltzmann constant, T is the temperature and N is the number of particles.
A partition function describes the statistical properties of a system in thermodynamic equilibrium. Partition functions are functions of the thermodynamic state variables, such as the temperature and volume. Most of the aggregate thermodynamic variables of the system, such as the total energy, free energy, entropy, and pressure, can be expressed in terms of the partition function or its derivatives. The partition function is dimensionless. The canonical partition function applies to a canonical ensemble, in which the system is allowed to exchange heat with the environment at fixed temperature, volume, and number of particles. The grand canonical partition function applies to a grand canonical ensemble, in which the system can exchange both heat and particles with the environment, at fixed temperature, volume, and chemical potential.

In systems with multiple quantum states s sharing the same energy Es, it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by j) as follows:

where gj is the degeneracy factor, or number of quantum states s that have the same energy level defined by Ej = Es.
According to the question, the given indistinguishable particles have only two possible energy states 0 and ε. Thus, the partition function will be the sum of distribution of particles in given two energy states and thus q can be written as:


