Created
April 18, 2014 00:40
-
-
Save jbenner-radham/11019130 to your computer and use it in GitHub Desktop.
C11 Generic Selector Test
This file contains hidden or 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() | |
{ | |
const char *str = "hello, world"; | |
char cc = 'c'; | |
printf("%s\n", _Generic(cc, char: "c", int: "i")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment