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
Templates mean
What is the difference between abstraction and polymorphism?
How do you achieve runtime polymorphism?
Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.
Describe these concepts: Polymorphism, Inheritance and Abstraction.
What is destructor example?
What is the main purpose of inheritance law?
What are the benefits of polymorphism?
What is object-oriented programming? Webopedia definition
What is encapsulation oop?
Which is better struts or spring?
How is polymorphism achieved?
What are the 4 main oop principles?
#include
What is coupling in oops?