Why static functions always uses static variables?

Answer Posted / george from psg

static function is constant to all object. In the same way
static variable is constant to all so we use static variable
in static function

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is inheritance write a program to show use of inheritance?

617


What are the data types in oop?

611


How does polymorphism work?

639


Advantage and disadvantage of routing in telecom sector

790


What is a function in oop?

635






What is the purpose of polymorphism?

683


What is a null tree?

632


can inline function declare in private part of class?

3666


How to call a non virtual function in the derived class by using base class pointer

5285


What does no cap mean?

594


How many human genes are polymorphic?

577


What is the difference between static polymorphism and dynamic polymorphism?

587


Can we override main method?

609


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.

635


Describe these concepts: Polymorphism, Inheritance and Abstraction.

616