you can use terminal to write C/C++ programs., but wait do you like really writing programs in terminal (vim/ nano - text editors) which are very uncomfortable for newbies.
So ....
which is best IDE provided in Mac to write C/C++ code with great suggestions while writing your pretty code ?
Guys the answer is Xcode. is you heard it write it is not just for developing iOS/Mac application. you can just explore into Xcode to find out new project option in Xcode which allows us to create Command line tool in C/C++...
Here are snaps for doing stuff
1. Open Xcode (You can download it from Xcode download ▼ )
2 . Go to File - > new -> Project
3 . Click on project -> Select Application in OS X section -> Select Command Line Tool
4 . This will create new project add product name and other information. Here you can select your choice of programming language (It includes C/C++)
5 . When you put all information and hit Next button you will land to project window just created by you.
NOW the time to run your hello world :)