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

Distinguish between a # include and #define.

0 Answers  


Generally variables are stored in heap memory. When he variables are created in stack?

4 Answers   Persistent,


Evaluate !(1&&1||1&&0) a) Error b) False c) True

0 Answers  


Why Pointers are not used in C++?

0 Answers   Global Logic,


What are the differences between a struct and a class in C++?

7 Answers   Amazon, Wipro,






What is data abstraction? How is it different from data encapsulation?

0 Answers  


Why c++ is the best language?

0 Answers  


What are the two types of comments, and how do they differ?

0 Answers  


Can we use resume in error handling i.e. in the catch block

5 Answers   Infosys,


What should main() return in c and c++?

0 Answers  


Are there any new intrinsic (built-in) data types?

1 Answers  


How come you find out if a linked-list is a cycle or not?

0 Answers  


Categories