title: How to write directly to a disk?
body: <p>I am a amateur programmer in C programming, I know how to read data directly from a drive (file = fopen("//./D:", "r"); ). Now I want to write data to the disk directly using the same way by changing the second argument of the mentioned function  to "w". But it doesn't work even when I run the program as administrator. I was wondering:</p>
  
  <ol>
  <li><p>How to write data directly to a drive or flash drive using C?</p></li>
  <li><p>How the programs like Diskpart.exe write to a disk?</p></li>
  </ol>
  
  <p>I am using Windows.</p>