What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?
#include using namespace std;
namespace myNamespace1
{ int x = 5; int y = 10;
}
namespace myNamespace2
{ float x = 3.14; float y = 1.5;
} int main () {
{
using namespace myNamespace1;
cout << x << " "; }{ using namespace myNamespace2; cout << y; } return 0; } A. It prints: 5 1.5
B. It prints: 3.14 10
C. Compilation error
D. None of these

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.