What is a scope resolution operator?

Answers were Sorted based on User's Feedback



What is a scope resolution operator?..

Answer / 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

What is a scope resolution operator?..

Answer / pankaj

A scope resolution operator (::), can be used to define the
member functions of a class outside the class.
It shows the scope resolution operator untangling a mess
made by using the same names for different kinds of entities
base class overridden member function using the scope
resolution operator (: :)

Is This Answer Correct ?    25 Yes 10 No

What is a scope resolution operator?..

Answer / khadeer.k

when a function is declared inside the class, it can be
used or imlemented with the operator called scope
resolution operator with a :: symbol.

Is This Answer Correct ?    24 Yes 16 No

What is a scope resolution operator?..

Answer / amrut kanthavadiya

when overriden arrives at that time scope resolution use
for seperate out overridden properties or Method.

Scope resolution use for access function or properities out
side from the class.

Is This Answer Correct ?    7 Yes 3 No

What is a scope resolution operator?..

Answer / bhagavathi chouhan

:: it is the symbol of scope resolution operator it is
define in the class

Is This Answer Correct ?    15 Yes 16 No

Post New Answer

More OOPS Interview Questions

what does exactly the linker do?

1 Answers  


why we are declare the function in the abstract class even though we are declaring it in Derived class?

1 Answers   TCS,


When is a memory allocated to a class?

11 Answers  


What is difference between oop and pop?

0 Answers  


What is a template?

7 Answers  






What does and I oop mean in text?

0 Answers  


What do you mean by public, private, protected and friendly?

3 Answers   CA,


I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?

3 Answers  


what are the ways in which a constructors can be called?

2 Answers   TCS,


Why is oop useful?

0 Answers  


What are the 4 main oop principles?

0 Answers  


WHAT IS ABSTRUCT DATA TYPE ? PLEASE EXPLAIN IT.

4 Answers   HCL,


Categories