Home » C++ Programming » Interfaces » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    namespace One
    {
    int K = 15;
    int L = 11;
    }
    namespace Two
    {
    double K = 4.016;
    double L = 7.6001;
    }
    int main ()
    {
    using One::K;
    using Two::L;
    bool p, q;
    p = K > L;
    q = One::K < Two::L;
    cout << p <<" " << q;
    return 0;
    }
    1. 15 11
    2. 11 15
    3. 4 7
    4. 7 4
    5. 1 0
Correct Option: E

We are inter mixing the variable and comparing it which is bigger and smaller and according to that we are printing the output.



Your comments will be displayed only after manual approval.