How can a '::' operator be used as unary operator?



How can a '::' operator be used as unary operator?..

Answer / subham chaudhary

The scope operator can be used to refer to members of the global namespace. Because the global namespace doesn’t have a name, the notation :: member-name refers to a member of the global namespace. This can be useful for referring to members of global namespace whose names have been hidden by names declared in nested local scope. Unless we specify to the compiler in which namespace to search for a declaration, the compiler simple searches the current scope, and any scopes in which the current scope is nested, to find the declaration for the name.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

0 Answers  


Explain the difference between using macro and inline functions?

0 Answers  


Why is c++ still best?

0 Answers  


How do you clear a set in c++?

0 Answers  


Why is c++ difficult?

0 Answers  






What is a constant? Explain with an example.

0 Answers  


There is a array of 99 cells and we have to enter 1-100 elements in it , no two elements would repeat , so the is one no. missing because 99 cells and 1-100 nos. so we had to implement a function to find that missing no.

2 Answers   Nagarro,


Differentiate between a template class and class template in c++?

0 Answers  


What is the role of C++ shorthand's?

0 Answers   TCS,


Define upcasting.

0 Answers  


What is the use of cmath in c++?

0 Answers  


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

0 Answers  


Categories