Advenced logical operators | Sololearn: Learn to code for FREE!


Advenced logical operators

Hello. I was wondering, if there is some short syntax for logical operators like XOR or NOR. In courses on sololearn, there are usually described only AND, OR and NOT operators. I know, that I can get NOR by connecting more simple operators together (like (!a && !b)), but for operators like XNOR, when I have multiple inputs this method gets unpractical. Is there something like (a 💠 b 💠 c 💠 d) where I can replace the flowers with a single symbol to get XNOR? I want to know syntaxes for XOR NOR NAND XNOR.

4/24/2018 7:34:12 PM

Jan Štěch

3 Answers

New Answer


It doesn't work. The code won't compile. Did I do something wrong?


So operator overloading?


Ok, thanks.