Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 8 queens problem meets obfuscated C programming

Author: Filip Tvrzsky

Date: 15:26:15 04/10/03

Go up one level in this thread


On April 10, 2003 at 18:05:25, Zach Wegner wrote:

>The GCC compiler seems to do something wrong. i get a bunch of output that looks
>like this:
>#
>#
>Q
>#
>#Q#
>#
>#
>
>
>#
>#
>#Q#
>#
>#
>Q
>#
>Anyone know whats going on?

The problem arose from the breaking of the fourth line of original code into two
parts. Fix this line which beginns:
for(s=8;*a-s;v=a[j*= ...
so that arguments of the printf function will be (2+"\n\n%c"-(!l<<!j),"
#Q"[l^v?(l^j)&1:2]) and the line will continue up to the semicolon:
 ... (i==j?a[i+=k]=0:++a[i])>=s*k&&++a[--i]);

Filip



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.