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
www.vceplus.com – VCE Exam Simulator – Download A+ VCE (latest) free Open VCE Exams – VCE to PDF Converter – PDF Online
{ int x = 5; int y = 10;
}
namespace myNamespace2
{ float x = 3.14; float y = 1.5;
}
int main () {
namespace newname = myNamespace1;
using namespace newname; cout << x << " "; cout << y; return 0; } A. It prints: 5 1.5
B. It prints: 3.14 1.5
C. It prints: 5 10
D. It prints: 5

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.