how to take the printout of the output of a c program
through a command in the program itself
and this should happen on the click of a button on the output screen
how to take the printout of the output of a c program
through a command in the program itself
and this should happen on the click of a button on the output screen
Once compiled and linked, the so-called C-program is not anymore a C-program (the sources are separated from the executable).Originally Posted by yviswanadham
Unless you still have an acces to the sources, you are not able to print out the program with the executable only.
If you still have an access to the sources (the latter being placed on a well defined place), you can printout them like any text file.
The only point is to have a complete list of source files. It could help if you have an access to the makefile and parse it. Quite a job...
Emmanuel Delahaye
"C is a sharp tool"
Unless of course the post was really about quines
http://www.nyx.net/~gthompso/quine.htm
It is very vague as to what is required.
If you meant about redirecting the output of a program into a file you can readily print, use this example:
Code:c:\> dir > output.txt
DOS/Windows:
Code:FILE *pp = fopen("LPT1", "w"); fprintf(pp, "I am printing!\n\f"); fclose(pp);