Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the use of unnamed namespaces in OOPS?
The only advantage I know is that they dont need the scope
resolution operator while accessing them. I want to know
some other advantages of unnamed namespaces...

Answers were Sorted based on User's Feedback



What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the..

Answer / santosh mundhe

Another advantage is that u can extend namespace within the
same file ....

E.g
#include <iostream>

using namespace std;

namespace
{
int myval;
void funct (int);
}

namespace
{
void funct (int i)
{
cout << i << endl;
}
}

int main()
{
funct(myval);
return 0;
}

Is This Answer Correct ?    1 Yes 0 No

What is the use of unnamed namespaces in OOPS? The only advantage I know is that they dont need the..

Answer / c++ coder

in addition to the advantage mentioned above , there is one
more that the namespace is local to the file and one cannot
use it into another by 'using namespace' since it is
unnamed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

0 Answers  


design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }

1 Answers   HSBC,


What is a function in oop?

0 Answers  


What does and I oop mean in text?

0 Answers  


is java purely oop Language?

49 Answers   HCL, Infosys, TCS,


Why we use classes in oop?

0 Answers  


what is object slicing

3 Answers   TCS,


When you define a integer it gets stored in which data structure?(Stack or a heap)

2 Answers   emc2,


What is polymorphism ? Explain with examples

8 Answers   Ness Technologies,


What are functions in oop?

0 Answers  


what is the difference between class and structure in C++?

9 Answers   Aspire, IBS, TCS,


what is virtual function?

26 Answers   Aspire, HP, Infosys, RoboSoft, TCS,


Categories