Monday 24 August 2015

A Quine Program in C


quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output. 

The program given below is a quine program in C.

char*s="char*s=%c%s%c;main(){printf(s,34,s,34);}";main(){printf(s,34,s,34);}


Figure below shows the output of the program


1 comment:

  1. Peculiar article, just what I wanted to find.

    ReplyDelete