Answer Posted / vikram
scope resolution operator(::) is used to define member
functions outside the class,that is we are defining the
member functions explicitly.
Scope resolution operator is also used to access the
globally declared variables.
for example,
#include<iostream.h>
int a=20;
main()
{
int a=10;
cout<<a<<endl<<::a;
}
here,the output will be:
10
20
thnx
| Is This Answer Correct ? | 38 Yes | 6 No |
Post New Answer View All Answers
What is new keyword in oops?
What is polymorphism what is it for and how is it used?
Why multiple inheritance is not allowed?
What is polymorphism in oop example?
Why do we use encapsulation in oops?
What is encapsulation and abstraction? How are they implemented in C++?
What is polymorphism what are the different types of polymorphism?
What is destructor oops?
What is the types of inheritance?
What is oops in simple words?
What is persistence in oop?
Whats oop mean?
What is data binding in oops?
What is the difference between a mixin and inheritance?
What is the purpose of enum?