How can I compile and run C in Xcode? Our teacher is teaching use some Data Structures algorithms that are being implemented in C. He uses Visual Studio in class, but I want to be able to run simple programs that we write in Xcode.

I've tried to run the code but in Xcode 5 the options to do so are greyed out. Besides just installing Xcode, what steps should I need to take so that I can run simple C programs on my Mac?
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