Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
using namespace std;
3.
namespace extra
4.
{
5.
int i;
6.
}
7.
void i()
8.
{
9.
using namespace extra;
10.
int i;
11.
i = 9;
12.
cout
Options:
A .  9
B .  10
C .  compile time error
D .  none of the mentioned
Answer: Option A

A scope resolution operator without a scope qualifier refers to the global namespace.



Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers