What is the output produced by the following program?
using namespace std;
namespace sally
{
void message( );
}
namespace
{
void message( );
}
int main( )
{
{
message( );
using sally::message;
message( );
}
message( );
return 0;
}
namespace sally
{
void message( )
{
cout << "Hello from Sally.\n";
}
}
namespace
{
void message( )
{
cout << "Hello from unnamed.\n";
}
}
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.