GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  OOPS

 Print  |  
Question:  How do you write a program which produces its own source code as its output?



July 07, 2006 03:21:28 #8
 wasim   Member Since: Visitor    Total Comments: N/A 

RE: How do you write a program which produces its own ...
 

#include<>

main()

{

         FILE *p;

             p=fopen("filename","r");

             if(p==null)exit(1);

       while(!eof(p))

     {

            printf("%c",*p);

               p++;

      }

getche();

}

     

 

Back To Question