r has always the last integer between the parenthesis.
What is the output of the following program?
#include <iostream>
using namespace std;
main() {
int i = 1, j = 2, k = 3, r;
r = (i, j, k);
cout << r <<endl;
}
Possible answers:
A - 1
B - 2
C - 3
D - Compile Error
What I want to know is why does this happen.