Your question is too vague and broad.
Do you know where all your files are? C: , D:, etc...
Do you know how to move all your files onto another partition?
Is the partition big enough to hold all your data?
Then you could boot into Ubuntu Installer and perform the install as long as you did not delete the partition with your data while installing Ubuntu.
I think it would be easier if you backed up your data to cloud drive, external hdd, etc...
Install Ubuntu, and create a NTFS partition while doing the custom partitioning. You will then have Ubuntu installed, and a new NTFS partition and can restore your data to that partition.
More Info:
First, I highly suggest a full backup of your data on an external hard drive.
You said you want to format c: and Install Ubuntu there.
On an external drive as example create a folder named backup.
In backup create folders C, D, G.
Check root of C:/ for any folders/files that may need backed up there, and then copy to C folder on external drive.
Go to c:\users and decide if you need to copy any users profile data.
Go to c:\user\ and this is the basic folders you would want to copy:
- Contacts
- Desktop
- Documents
- Downloads
- Favorites
- Music
- Pictures
Videos
You can choose to copy more, but may end up getting errors and that will not be covered here. Also, you can choose to view hidden files, but again that will not be covered here.
Next, view D partition and copy all data to D folder on external drive. Use same instructions example for copying G partition contents to G folder on external hard drive.
Next,after having a full backup you would then boot from "Ubuntu Live CD" and choose to install Ubuntu, selecting a custom install.
Please view some of the duplicate answers and see how to do partitioning. The in-a-nutshell version is that you are ONLY selecting the C: drive partition to format. The thing that may confuse users is when they see all the partitions. With a Windows install you are going to see your c,d,g partitions as well as boot, efi, hidden and other partitions as well. So, you would delete ALL partitions except D, G and create your partitions for Ubuntu.
I personally, if you have all data backed up would just format the whole hard drive, while doing custom partitioning, re-create a D, G partition as you wanted as NTFS or Fat32 and then continue with Ubuntu install and copy data back over. I say this because I think that is easier for someone who is not familiar with hdd partitioning.
I'd suggest looking at duplicate answers and/or find a documents that has details and screenshots detailing the process.