Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[C] Comparisons versus XOR

Name: Anonymous 2010-11-14 12:39

You're parsing arguments and they are mutually exclusive.


if ((A == 0 && B == 0) || (A != 0 && B!= 0))
 return EXIT_FAILURE;


 versus


if ((A ^ B) == 0)
 return EXIT_FAILURE;

Name: Anonymous 2010-11-16 21:12

>>14
From the first example given by the OP you should be able to get that he's parsing two arguments and only one is accepted into his shit.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List