Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
You cannot make changes to an active file system. You will need to boot an external diagnostic or installation disc: I would normally use gparted on Ubuntu Live for this. Of course, it goes without saying that you must back up everything before making any partition change - a full disc copy will allow the quickest recovery if anything goes wrong.
It may also be that some files have been written near the end of the C: partition, even though only a fraction of the partition has been used. In that case, when resizing with gparted, MinitTool Partition Wizard or other utility (run from Linux or WinPE media, as @Michael states), you may find limitations on how much the partition can be shrunk.
gparted
on Ubuntu Live for this. Of course, it goes without saying that you must back up everything before making any partition change - a full disc copy will allow the quickest recovery if anything goes wrong.