How can I compile and run C in Xcode?
Open Xcode
Select File-&gt;New-&gt;New Project
Select macOS (OS X in older versions) -&gt; Command line tool
Choose C as type
Fill out the name and the other relevant wizards parts you need
click the main.c file to select it

And you should be good to go