Created
April 26, 2020 08:35
-
-
Save TamojitSaha/ef1cffc6e7b9d627d874dd2752dca1f9 to your computer and use it in GitHub Desktop.
demonstartion of ternary operator without if condition in C
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 i=1; | |
int main() | |
{ | |
(i) ?: 1; | |
printf("%d",i); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@sandeepansg Have a look.