Printing its own source code..

Status
Not open for further replies.

real_in

In Runtime
Messages
277
well a simple or may be a big(for me) querry is there..

how can i print the source code as the output of the program..

like i write

void main()

{

printf<<"hello world";
}

the output should be the same as :-

void main()

{

printf<<"hello world";
}


please help me..
do i need to put in some files concept.. i m n00b with C or C++, if files we gotta use, can u guyss write a small sample code..
thanks a lot in advance..
 
This sounds like homework. You should do your own homework, and yes, you will need to do file i/o.
 
Status
Not open for further replies.
Back
Top Bottom