X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Martin Ambuhl User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: to check given no. is power of 2 References: <5dcec181a17 DOT 4294582b AT default DOT domain> <1117087925 DOT 618739 DOT 43980 AT g44g2000cwa DOT googlegroups DOT com> In-Reply-To: <1117087925.618739.43980@g44g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 22 Message-ID: <59fle.8038$M36.234@newsread1.news.atl.earthlink.net> Date: Thu, 26 May 2005 07:46:09 GMT NNTP-Posting-Host: 165.247.30.13 X-Complaints-To: abuse AT earthlink DOT net X-Trace: newsread1.news.atl.earthlink.net 1117093569 165.247.30.13 (Thu, 26 May 2005 00:46:09 PDT) NNTP-Posting-Date: Thu, 26 May 2005 00:46:09 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com aveo wrote: > no sir, > u r taking all it wrong > i want to check given no. is power of 2 or not without checking any > condition. > no if > no while > no condi?stat1:stat2 > > in the entire code > You will note that the function I posted earlier inline unsigned is_power_of_2 (unsigned n) { return (n && !(n&(n-1))); } has no if, no while, and no ?:. If you cannot bother to spell out 'you' and 'are' or to properly capitalize your sentences, I doubt you have the linguistic discipline to be a programmer.