• A program which produces its own source code as its output?


    #include<stdio.h>
    #include<conio.h>
    int main(){
    clrscr();
        FILE *fp;
        char c;

        fp = fopen(__FILE__,"r");

        do{
             c= getc(fp);
             putchar(c);
        }
        while(c!=EOF);

        fclose(fp);
        getch();
        return 0;
    }


2 comments:

  1. Anonymous said...

    interesting...

  2. Unknown said...

    thanks buddy!!

Post a Comment