fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a = -1, b = -1, c = -1;
  5. int d = 0;
  6. d = a++ && b++ || c++;
  7. printf("a = %d, b = %d, c = %d, d = %d",a,b,c,d);
  8. d = ++a && ++b;
  9. printf("a = %d, b = %d, c = %d, d = %d",a,b,c,d);
  10. d = a++ && ++b;
  11. printf("a = %d, b = %d, c = %d, d = %d",a,b,c,d);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 4312KB
stdin
Standard input is empty
stdout
a = 0, b = 0, c = -1, d = 1a = 1, b = 1, c = -1, d = 1a = 2, b = 2, c = -1, d = 1