English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

5 answers

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

2007-02-26 01:34:31 · answer #1 · answered by Broccoli Lover 2 · 0 0

It's been done.
Look on the web.
Two options: Either you have to have a loop so it can print it's own sourcecode twice without actually including it twice.
The other option was cheating: A program that read and printed its own sourcefile. I liked that one for thinking outside the box :)

2007-02-26 00:30:57 · answer #2 · answered by mgerben 5 · 1 0

u have to type more than 50 lines.bcoz its the task of assembler that is in 1st pass it generate souce code along with symbol table.just refer any 3rd sem computer science engg student.bcoz they have the subject system software and they also has corresponding lab their 1st expriment is this.try in this way

2007-03-01 00:36:55 · answer #3 · answered by dhoni s 1 · 1 0

dear,
this question applies even when source file is deleted
and yes there is only 1st option available.

2nd one is too easy though.

yes it is a loop kind of bit obscure code.
i once found on net.
dont remember though.

2007-02-26 01:03:04 · answer #4 · answered by munishgoyal 1 · 1 0

You can try compiling and running the following C program...

2007-02-26 23:30:13 · answer #5 · answered by Ravi 2 · 1 0

fedest.com, questions and answers