home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1989 …il & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / DTS Goodies / Obfuscated_C / 1988 / litmaath.hint < prev    next >
Encoding:
Text File  |  1989-04-13  |  866 b   |  31 lines  |  [TEXT/MPS ]

  1. Best small program: <cs.vu.nl!maart> Maarten Litmaath
  2.  
  3.     Maarten Litmaath
  4.     Free University (VU) Amsterdam
  5.     Department of computer science
  6.     Uilenstede 72
  7.     1183 AK Amstelveen
  8.     The Netherlands
  9.  
  10. Try: litmaath eschew obfuscation
  11.  
  12. Note the unusual structure:
  13.  
  14.      while (<condition>)
  15.          ;
  16.  
  17. Did you notice that the body is empty?
  18.  
  19. The best one can do to understand how the program works is to give it
  20. two small strings as arguments, and follow the program closely.  One
  21. could make the body of the 'while' loop an 'fprintf' with interesting
  22. variables like:
  23.  
  24.     fprintf(stderr,
  25.          "argv=%lo *argv=%lo **argv=%c argv[1]=%lo *argv[1]=%c argc=%d\n",
  26.          (long) argv, (long) *argv, *argv && **argv ? **argv : '@',
  27.          (long) argv[1], argv[1] && *argv[1] ? *argv[1] : '@', argc);
  28.  
  29. Furthermore, it's interesting to note that only two variables are
  30. used to achieve everything.
  31.