Created
February 9, 2019 21:27
-
-
Save kerolasa/9a2654c27334490e1ba637cebce73f5e to your computer and use it in GitHub Desktop.
C comma operator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
int a = 1; | |
int b = 2; | |
int c = 3; | |
int y = a >= (4, b); | |
int x = c >= (5, b); | |
printf("%d\n", y); | |
printf("%d\n", x); | |
return 0; | |
} | |
/* See also https://mindtribe.com/2011/07/forgotten-c-the-comma-operator/ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment