[ create a new paste ] login | about

Link: http://codepad.org/fcYCtYXy    [ raw code | output | fork ]

C, pasted on Jul 16:
1
2
3
4
5
6
7
8
9
10
long long f() { return 1,2; }

int main()
{
  long long ba = f(); // result reversed
  long b = ba;        // get the second element from pair
  long a = ba - 1;    // get the first element from pair
  printf( "%d %d\n", a, b ); // prints 1 2 as expected
  return 0;
}


Output:
1
1 2


Create a new paste based on this one


Comments: