How to print source code of a Program.






#include<stdio.h>
#include<conio.h>
 int main()
 {
 FILE *HORIZONT;//Horizont is the name of file.
 char q;
 HORIZONT = fopen(__FILE__,"r");//Location of the file,r is for reading .
 do
 {
  q = getc(HORIZONT);//Reading the characters.
  putchar(q);//Writing the characters.
  }
  while(q != EOF);//The loop continues till the end of file.
  fclose(HORIZONT);//The file is closed
   getch();
   return 0;
}
Posted by lol ik.

Comments

Popular Posts