Member • Feb 22, 2015
How does the comma acts here as an operator or as a separator?
#include
- int main()
- {
- int i;
- int g= i=8?(printf("hello"), printf("life")), printf("kill");
- printf("%d",g);
- return 0;
- }
- I am confused with the fact that when I write int a=(8,9) so the value assigned to a is 9 because the comma acts here as an operator,then why does here both the printf's are getting executed.