write this program and save it as pro.c....run....it will show the program to the consol and write the source code into data.txt file...................
#include<stdio.h>void main(){ FILE *fp *ft; char buff[100]; fp fopen( pro.c r ); if(fp NULL) { printf( ERROR ); } ft fopen( data.txt w+ ); if(ft NULL) { printf( ERROR ); } while(getc(fp)! EOF) { fscanf(fp s buff); printf( s\n buff); fprintf(ft s\n buff); }}
A program that produces its complete source code as its only output is called a quine.
Eg:
char*f char*f c s c;main()printf(f 34 f 34 10); c ;main()printf(f 34 f 34 10);