Home » C++ Programming » Operators » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int p = 7, q = 9, r, s;
    r = p, q;
    s = (p, q);
    cout << r << ' ' << s;
    return 0;
    }
    1. 7 9
    2. 9 7
    3. 9
    4. 7
    5. None of these
Correct Option: A

It is a separator here. In r, the value p is stored in r and in s the value q is stored in s because of the bracket.



Your comments will be displayed only after manual approval.