Question: What would the following code print? #include using namespace std; namespace first { int x = 5; } namespace second { double x =

What would the following code print? #include using namespace std; namespace first { int x = 5; } namespace second { double x = 3.1416; } int main() { int x = 4; cout < < (x* first::x) < < ''; cout < < x < < ''; cout < < second::x < < endl; cout < < x < < endl; return 0; }
Step by Step Solution
3.40 Rating (159 Votes )
There are 3 Steps involved in it
The first two cout statements would print 5 and 4 respectively The third cou... View full answer
Get step-by-step solutions from verified subject matter experts
