C++ Programming :: Namespaces - Discussion
Home > C++ Programming > Namespaces > MCQs Questions Discussion
9 / 12
What is the output of the below C++ program?
#include <iostream>
using namespace std
namespace space
{
int x = 10;
}
namespace space
{
int y = 15;
}
int main(int argc, char * argv[])
{
space::x = space::y =5;
cout << space::x << space::y;
}
#include <iostream>
using namespace std
namespace space
{
int x = 10;
}
namespace space
{
int y = 15;
}
int main(int argc, char * argv[])
{
space::x = space::y =5;
cout << space::x << space::y;
}
A1015
B1510
C55
DCompilation Error
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
No Discussion on this question yet!