redirect output to file?

Hi:
I am currently working on a program which requires direct its ouput to a file here is an example

./proram arg_1 arg_2

when program ends all output will be arg_2 file

Is that possible I am not a bad programmer, However I am stuck there.

Can anyone give a hint?

Thanks

SW

Without the need to sound rude or presumptuous, but this could be seen as a homework type question - which is a no-no. Please refer to this thread.

To answer your question...

./proram arg_1 > arg_2

The <,>,>> are known as a redirection characters. You can read up on them.