I wrote a program that compiles and runs an external program(prog1.c). And I want to get the output of the prog1.c somehow.
for example if prog1.c is printf("HELLO");
and prints HELLO to the terminal, I want this output to get to a variable in my program or a file.
I saw somewhere something about pipe, but I dont know this command much and dont know if this is the right way.
Anyone can help me, direct me or show me an example?
Thank you!