0 votes 0 votes #include<isotream > using nam espace std; m ain() { int i = 1, j = 2, k = 3, r; r = (i, j, k); cout<<r<<endl; } The output of this program is 3. Can anyone please explain why? What is the meaning of this line r = (i, j, k); renu sharma asked Aug 20, 2017 renu sharma 241 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes Comma has the least preference among all operator in C and C++. and executed left to right. So in this case answer is 3. See source for a detailed explanation. Source: http://www.geeksforgeeks.org/comna-in-c-and-c/ smsubham answered Aug 21, 2017 smsubham comment Share Follow See all 0 reply Please log in or register to add a comment.