Examveda

What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
namespace 
{
	int var = 10;
}
int main()
{
	cout<<var;
}

A. 10

B. Error

C. Some garbage value

D. Nothing but program runs perfectly

Answer: Option A


Join The Discussion

Related Questions on Functions and Procedures in C plus plus