EDN Admin
Well-known member
Hello Sir/Madam,
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 Is it possible to write a program which when executed prints itself as the output?
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 For Example:
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 If my program is
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 public sub PrintMethodItself()
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 {
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 // some coding to print....
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 }
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 my expected output is:
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 public sub PrintMethodItself()
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 {
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 // some coding to print....
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 }
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
View the full article
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 Is it possible to write a program which when executed prints itself as the output?
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 For Example:
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 If my program is
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 public sub PrintMethodItself()
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 {
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 // some coding to print....
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 }
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 my expected output is:
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 public sub PrintMethodItself()
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 {
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 // some coding to print....
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1 }
<span style="color:#333333; font-family:Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif; font-size:13px; line-height:normal; background-color:#f1f1f1
View the full article