Here is a C program to printit’s own source code. That is the output of this program is exactly same asit’s source code. Here’s theprogram
#include
char*program=”#include%cchar *program=%c%s%c;%cvoid main()%c{%cprintf(program,10,34,program,34,10, 10,10,10);%c}”;
void main()
{
printf(program,10,34,program,34,10,10,10,10);
}
#include
char*program=”#include
void main()
{
printf(program,10,34,program,34,10,10,10,10);
}
No comments:
Post a Comment