1990 ACM East Central Regional Programming Contest

Problem 3: Reverse

Source file: prob3.c or prob3.pas
Input file: none
Output file: prob3.out

The Problem

Write a program which has no input (i.e., contains no input statement - read, readln, scanf, fget, ...) and displays a copy of its source program code in order immediately followed by its source code in reverse. The resulting output will be a palindrome, except that carriage-return line-feed sequences are not reversed.

Abstract Example:

*** Hypothetical Input ***

#include 

int used[10] = {0};
long denominator = 0;

/* Here's a Strange one */
main()
{
   bla;
   bla;
   bla;

   exit (0);
}

Output

int used[10] = {0};
long denominator = 0;

/* Here's a Strange one */
main()
{
   bla;
   bla;
   bla;

   exit (0);
}
}
;)0( tixe

;alb
;alb
;alb
{
)(niam
/* eno egnartS a s'ereH */

;0 = rotanimoned gnol
;}0{ = ]01[desu tni

>h.oidts< edulcni#