Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
TCS NQT Technical and Managerial Round Interview Questions

C++ Programming :: Namespaces - Discussion

Home > C++ Programming > Namespaces > MCQs Questions Discussion

8 / 12

What is the output of the below C++ Program?

#include <iostream>
        using namespace std;
        namespace first
        {
            int x = 5;
            int y = 10;
        }
        namespace second
        {
            double x = 3.1416;
            double y = 2.7183;
        }
        int main ()
        {
            using first::x;
            using second::y;
            bool a, b;
            a = x > y;
            b = first::y < second::x;
            cout << a << b;
            return 0;
        }

A11

B1

C0

D10

Answer: Option (Login/Signup)

Show Explanation

Asked In :: Societe Generale

Post Your Answer Here:     

No Discussion on this question yet!