Program to Print it’s Own Source Code
Submitted by Srikanth on Saturday, 24 November 200710 Comments

Here is a C program to print it’s own source code. That is the output of this program is exactly same as it’s source code. Here’s the program
#include<stdio.h>
char *program=”#include<stdio.h>%cchar *program=%c%s%c;%cvoid main()%c{%cprintf(program,10,34,program,34,10, 10,10,10);%c}”;
char *program=”#include<stdio.h>%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);
}
Popularity: 1% [?]
By using/following this site you agree to our Legal Disclaimer


Hey Srikanth, can u please send me such type of c programs @ hitesh.m01@gmail.com.
this is a great site which helped me a lot
great work is done by u for learners of c Keep it up.
how about one more the smallest quine ever
main() { char *s=”main() { char *s=%c%s%c; printf(s,34,s,34); }”; printf(s,34,s,34); }
hello Srikanth,
can u please mail me some game source codes
Can u please explain the code????
Hi
srikanth please send me c code which is destroy the another exe files of windows
#include
main()
{
FILE *fp=fopen(__FILE__,”r”);
char ch;
printf(“Hello World\n”);
while(!feof(fp))
{
ch=fgetc(fp);
printf(“%c”,ch);
}
}
This program also prints it out source code as output .
can we use this program to get source code of exe file that has been coded in c language ,please mail it to aparajitlal.kumar@gmail.com
with thanks.
can it possible to run a .exe or .mp3 or .jpeg or etc… files through
c or c++
nice trick thanx
thanx you sir
Leave your response!
EMAIL SECURITY »
What to Do When Your Email Account is Hacked?
How to Recover Hacked Email Accounts?
It can be a real nightmare if someone hacks and takes control of your email account as it may contain confidential information like bank logins, credit card details and other sensitive data. …
HOW STUFFS WORK »
How Antivirus Software Works
Due to ever increasing threat from virus and other malicious programs, almost every computer today comes with a pre-installed antivirus software on it. In fact, an antivirus has become one of the most essential software package for every computer. Even though every one …
HOW-TO GUIDES »
How to Hide Data in Image, Audio & Video Files: Steganography
Ever wondered to know how to hide secret messages in images, audio and video files? Well, in this post I will take you through a concept called steganography using which, it is possible to hide your secret information …
INTERNET SECURITY »
How to Hide Data in Image, Audio & Video Files: Steganography
Ever wondered to know how to hide secret messages in images, audio and video files? Well, in this post I will take you through a concept called steganography using which, it is possible to hide your secret information …
NETWORK HACKS »
How to Hack an Ethernet ADSL Router
Almost half of the Internet users across the globe use ADSL routers/modems to connect to the Internet however, most of them are unaware of the fact that it has a serious vulnerability which can easily be exploited even by a …
Categories
Most Popular
Most Commented
Blogroll
Log In | Entries (RSS) | Comments (RSS) | Sitemap
© 2008-2011 GoHacking.Com. This content is copyrighted to Srikanth and may not be reproduced on other websites.