Why static functions always uses static variables?

Answer Posted / som shekhar

If you take in the context of the class, static member
functions cannot be called by the ordinary objects because
when normal object calls the function then address of the
object is passed is collected by "this" pointer and static
member function don't have "this" pointer.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism programming?

607


Can we create object of interface?

611


What is a superclass in oop?

673


What is oops concept with example?

582


Give two or more real cenario of virtual function and vertual object

1858






What is abstraction oop?

627


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

1984


What type of loop is a for loop?

690


Why is encapsulation used?

582


Templates mean

1592


What are the 4 pillars of oop?

676


What is polymorphism in oops with example?

535


What is oops with example?

568


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1661


Explain the advantages of inheritance.

677