fork download
  1. #include <cstdio>
  2.  
  3. int your_function(int a, int b)
  4. {
  5. return a - b;
  6. }
  7.  
  8. int main(void)
  9. {
  10. int i = 10;
  11.  
  12. //printf + function call expression
  13. printf("%d - %d - %d\n", i, your_function(++i, ++i), i);
  14. //nested function calls to custom function:
  15. //you may expect 12 - (12 - 13) = 12 - (-1) = 13
  16. printf("%d\n", your_function(i, your_function(i++, i)));
  17. return 0;
  18. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
12 - 0 - 12
14