home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / languages / C / ioccc / 1990 / pjr.hint < prev    next >
Encoding:
Text File  |  1992-10-18  |  1.4 KB  |  61 lines

  1.  
  2. Most Unusual Data Structure <pjr@pyra.co.uk> Peter J Ruczynski
  3.  
  4.     Peter J Ruczynski.
  5.     Pyramid Technology Ltd.
  6.     Pyramid House,
  7.     Solatron Road
  8.     Farnborough.
  9.     Hants GU14 7PL
  10.     England, U.K.
  11.  
  12.  
  13. Judges' comments:
  14.  
  15.     This program prints out a string.  Can you figure out how
  16.     it is done?
  17.  
  18.     By use of pointers to functions returning a struct of pointers 
  19.     to functions!
  20.  
  21.     Note that some compilers will be unable to compile the
  22.     expression 'X=g()...' in main due to lack of temporary
  23.     value space.  One might want to try replacing main with:
  24.  
  25.         main(){X=s().v().o().o().l().S().d().l().i().o().w().N();}
  26.     
  27.     if this is a problem.
  28.  
  29.  
  30. Spoiler: (rot13 to read)
  31.  
  32.     Guvf cebtenz cevagf bhg gur fgevat:
  33.  
  34.     gur dhvpx oebja sbk whzcrq bire gur ynml qbt
  35.  
  36.     ol hfr bs cbvagref gb shapgvbaf ergheavat n fgehpg bs cbvagref 
  37.     gb shapgvbaf!
  38.  
  39.  
  40. Selected notes from the author: (rot13 to read)
  41.  
  42.     Vg vf fvzcyr gb znxr gur cebtenz cevag bgure fgevatf.  Rnpu
  43.     nycunorgvpny punenpgre sebz n gb m vf cevagrq bhg nf vgf
  44.     bccbfvgr:
  45.  
  46.         n->m o->l p->k rgp
  47.  
  48.     Gb rapbqr n arj fgevat vachg gur fgevat nf vg vf zrnag gb pbzr bhg:
  49.  
  50.         K=f().i().b().b().y().F().q().y().v().b().j().A();
  51.  
  52.     Abgr: F() ercerfragf n fcnpr naq A() n arjyvar.  Guvf jvyy abj
  53.     cebqhpr...
  54.  
  55.         uryyb jbeyq
  56.  
  57.     By the way, there is actually a piece of code which is not used
  58.     in the original program! I leave it as an intellectual exercise
  59.     to the reader to find out what it is.
  60.  
  61.