The scope of a namespace is code example
Example: what is namespace in c++
//namespace is a declarative region to provide scope for identifiers
#include <bits/stdc++.h>
using namespace std; //including namespace std for cin and cout
//my custom namespace for variables and functions
namespace abc
{
void fun()
{
cout<<"Hello world"<<endl;
}
int x=10;
}
using namespace abc;
int main()
{
cout<<10;
fun();
return 0;
}