• Advertisement
Sign in to follow this  

Strange Corners of C

This topic is 988 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm pretty sure I've seen a good chunk of these on the forums at one point or another, but they're still pretty fun, and it's cool to see all of these in one place. My favorite is Duff's Device:

 

http://blog.robertelder.org/weird-c-syntax/?utm_content=buffer973d2&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer

Share this post


Link to post
Share on other sites
Advertisement
#include <iso646.h>
#include <stdio.h>

int main(void)
{
    printf("%d\n", (1 xor 2) and (3 or not 5));
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement