First, it is better to give some more precise information on your partitions.
You can use the GParted livecd.
You can take a screenshot of the GParted screen, that shows the existing partitions on the hard disk.
Furthermore, you can post here the output of the command
sudo fdisk -lu
from the command line (terminal window). It gives many useful details.
Are you sure that both partitions are primary?
Often, that D partition is a logical partition located in an extended partition. In this case, you need to shrink "D", and then shrink the extended partition too. After that, the unallocated disk space can be used to grow the "C" partition.
GParted names the partitions as /dev/sda1, /dev/sda2, /dev/sda5 etc.
Numbers 1-4 are used for the primary partitions. Numbers 5 and higher are used for the logical partitions.
In any case, please take care to use the option "round to nothing" for the system partition. This will ensure that the first sector of the partition remains the same (otherwise, the system can become unbootable).
(moved to the Live Media section)
*** It is highly recommended to backup any important files before doing resize/move operations. ***