When your program runs, do the first instruction. If it is causing segmentation fault, put a while true or cin in the start of main loop, execute it. So it will be caught up in the while loop or may be waiting for the input. When it happens, run the first instruction to get the name of your executable.
First open a terminal and then type:
ps ax | grep <name of your executable>This would list the complete path to the executable with any arguments present.