-
What is the output of this program?
#include
using namespace std;
namespace One
{
int num = 12;
}
namespace Two
{
double num = 10.027;
}
int main ()
{
int n;
n = One::num + Two::num;
cout << n;
return 0;
}
-
- 22
- 12
- 10.027
- 22.027
- None of these
Correct Option: A
As we are getting two variables from namespace variable and we are adding that.