command line arguments in C programming

hi...im a new programmer in C and we have this assignment to do...i'v managed most of it but one of the specifications is that if the user enters "-gnuplot" after the program name in the command line, the program should pass its values to gnuplot and use gnuplot to graph the results of the program...that's what i understand from it...does anybody know how i can pass the results i've obtained to gnuplot?

here's the actual question for that part:f)If -gnuplot is specified, the output is being pipe to the gnuplot program and hence will need to have gnuplot commands prepended and appended. % a.out -gnuplot |gnuplot You will need to find out how to use gnuplot fromhttp://www.gnuplot.info/documentation.html