Home » C++ Programming » Operators » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    int K, L;
    L = 12;
    K = (L++, L + 105, 99 + L);
    cout << K;
    return 0;
    }
    1. 105
    2. 99
    3. 12
    4. 1010
    5. 112
Correct Option: E

L starts with the value 12. L is then incremented to 13. Next, L is added to 105. Finally, L (still containing 13) is added to 99 which yields the result 112.



Your comments will be displayed only after manual approval.