The below code is the configuration for the Microsoft Visual Code tasks which will enable you to compile and run C program
Cmd + Shift + P
Configure task( A task.json file will be created for that project )
- Copy below configuration code and save it.
Cmd + Shift + B to compile and run.
Note: Make sure you select the tab having C program as below tasks run on active tab in VS Code.