The below code is the configuration for the Microsoft Visual Code tasks which will enable you to compile and run C program
- Press
Cmd + Shift + P
- Type
Configure task
( A task.json file will be created for that project ) - Copy below configuration code and save it.
Simple press 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.