What is a scope resolution operator?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.
write a program to find 2^n+1 ?
What is destructor in oop?
which is best institute to learn c,c++ in ameerpet hyderabad
Why static functions always uses static variables?
what is the difference between class to class type conversion and copy constructor ?
What is the difference between pass by reference and pass by value?
what is the difference b/w abstract and interface?
2 Answers Merrill Lynch, Schneider, Scio Healthcare,
What is overriding in oop?
pointers are support in C#? if yes then how to use it?
8 Answers Softvision Solution,
Can a varargs method be overloaded?
What are the valid types of data that the main () can return in C/C++ language