Q:

How can I launch a C application from terminal, and pass in paramaters to int main(int argc, char *argv[])?

I'm new to development on Mac - I'm coding in xcode and I can't figure out how to launch my application with paramaters. I can navigate to the application directory and do something along the lines of:
open application

But I can't do:
open application param1 param2

What am I missing?

A:

Use the --args flag, available in OS X 10.6.2 or later:
open application --args param1 param2

See How can I run an application with command line arguments in Mac OS for more information.

