Showing posts with label What is Quine?. Show all posts
Showing posts with label What is Quine?. Show all posts

Wednesday, March 23, 2011

What is Quine?

/*A program that produces its complete source code as its only output is called a quine.*/

# include "stdio.h"
# include "windows.h"
int main()
{
FILE *fRead;
char ch;
fRead = fopen("\Quine.c","r");
if(fRead == NULL)
MessageBox(0,"Karthik","Please Check the Source ile path",16);

while((ch=fgetc(fRead) )!= NULL)
{
printf("%c",ch);
}

return 0;
}


OUTPUT:

# include "stdio.h"
# include "windows.h"
int main()
{
FILE *fRead;
char ch;
fRead = fopen("\Quine.c","r");
if(fRead == NULL)
MessageBox(0,"Karthik","Please Check the Source ile path",16);

while((ch=fgetc(fRead) )!= NULL)
{
printf("%c",ch);
}

return 0;
}