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

any one please tell me the purpose of operator overloading

0 Answers   Amazon,


What are the important components of cohesion?

0 Answers  


What is operator overloading? Give Example

11 Answers   CTS, IBM, TCS,


Write pseudo code for push in a stack?

2 Answers   emc2,


What is a unary operator?

5 Answers  


write string class as your own class in java without using any built-in function

0 Answers  


Can we have a private constructor ?

12 Answers   HSBC, Ness Technologies, TCS, Wipro,


Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}

1 Answers   Wipro,


What is polymorphism programming?

0 Answers  


what is the difference between <stdio.h>and "stdio.h"?

5 Answers  


What is a scope resolution operator?

5 Answers   HP, IBS,


Explain the concept of abstracion and encapsulation with one example. What is the difference between them?

3 Answers   PCS,


Categories