One easy way to do this is to get a standalone build of MinGW-w64 for Windows from https://winlibs.com/.
This will provide you with all the tools you need to compile and link Windows programs.
The command will be gcc instead of cc, but to run it, you should specify its complete path. When the download is extracted you can find it under mingw64\bin\gcc.exe. Or you can add it to the PATH environment variable (but I don't recommend this).
There are examples on how to use it at https://winlibs.com/.
If you are a beginner it is recommended to use a GUI like VSCode or Code::Blocks, so you won't need command line actions to compile and link your code, and you can even debug your code if you need to.
Answer from Brecht Sanders on Stack Overflowassembly - How to compile C programs using cc command in cmd - Stack Overflow
Compiling C-code from the Command Prompt in Windows? - Stack Overflow
How to run C in windows
How to run c++ files in the command line?
Videos
You do this:
Copycl app.c
Here's a complete transcript, including setting up the environment for Visual Studio 2005 (change "8" to "9.0" for Visual Studio 2008).
CopyC:\src\tests>"\Program Files (x86)\Microsoft Visual Studio 8\vc\bin\vcvars32.bat"
Setting environment for using Microsoft Visual Studio 2005 x86 tools.
C:\src\tests>type app.c
#include <stdio.h>
int main(void)
{
printf("Hello world!\n");
return 0;
}
C:\src\tests>cl app.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
app.c
Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation. All rights reserved.
/out:app.exe
app.obj
C:\src\tests>app
Hello world!
MinGW provides a popular command-line GCC compiler for Windows.