Dear Sir(Paul Herring),
It is none of the things that you stated. Actually i am just a student
at an university who is trying to creatively use the many things
available in C language :-) . And one more thing thanks for the mail I
never had an idea that that kind of code can be used in obfuscating the
code =-O
On topic : I have one more code to share which i wrote for the same
problem. but it works for positive ints only it is as follows:
int biggest (int a, int b) {
int result;
(a-b)<0 && (result = b);
(b-a)<0 && (result =a);
(a-b) == 0 && (result=a);
}
sadly the above snippet works only for positive ints(as far as i know)
any ideas to shorten it, or make it work for negative ints??
Regards
anup
On 12/27/2009 2:17 AM, Paul Herring wrote:
>
> On Sat, Dec 26, 2009 at 6:42 PM, Anup Joshi <[email protected]
> <mailto:joshianups%40gmail.com>> wrote:
>
> > but i didnt want to use the ternary operator, if-conditional
> > or any loop.
>
> Why? If I found you deliberately obfuscating code like this in your
> job where I also worked, you wouldn't have a job for much longer. In
> real life, you do not deliberately obfuscate code like this.
>
> If this is a requirement of an exam question, you're doing the wrong
> course for a programmer - they're teaching you bad habits, and not
> what you should be learning.
>
> If this is a job interview question, you don't want to work there
> since all the code is likely to be obfuscated - see my first point.
>
> --
> PJH
>
> http://shabbleland.myminicity.com/ <http://shabbleland.myminicity.com/>
> http://www.chavgangs.com/register.php?referer=9375
> <http://www.chavgangs.com/register.php?referer=9375>
> http://www.kongregate.com/?referrer=Shabble
> <http://www.kongregate.com/?referrer=Shabble>
>
>
[Non-text portions of this message have been removed]