How does gvim/vim set the location where the generated files are saved?

  question, vim

My vim and mingw are installed on disk E. When I write the C file, vim commands:w 1.cWill be inE:\vim\vim74To generate 1.c in, and use mingw also requiresGcc+c file location, the generated a.exe is saved in theC:\Users\user>.
Is there any way to make my operation convenient? For example, I just need to make an order in vim
w 1.c
Command in cmd
gcc 1.c
a.exe

Can compile and run?

Starting vim and mingw with cmd will generate the destination file in the directory pointed by powershell.

Or Linux