How to write output of a c program into a file and store it?


 Step1: Compile your c Program using command: gcc main.c -o main
 Step2: ./main >filenametostoreoutput.txt