Giving Command line arguments in Xcode in C program

As of Xcode 4.x I've had to go to the Product menu, select "Edit Scheme", then select the arguments tab and add the arguments there.


Keyboard shortcut is commandshift<


Pre Xcode 4.x
Right click the executable in your Xcode project and pick "Get Info". Then pick the "arguments" tab and you can set arguments to pass when you run or debug your program from inside Xcode.

Xcode 4.x or later
Go to the Product menu, select "Edit Scheme", then select the arguments tab and add the arguments there.


In Xcode 8.x just select the project from the title bar and select Edit Scheme (not schema), then select the Run debug and select the Arguments Tab from the popup window.

enter image description here

enter image description here