difference between static and non-static variables?
Answer Posted / santosh mundhe
Static:1)Memory allocated before creation of object.
2)Gets memory on Global segment.
3)Object can't get copy of static variable, each
object shears static variable from global segment.
4)Static variables are not part ob object.
Non-static:
1)Gets memory on satck segment.
2)Object gets copy of non static variable.
3)Non static variables are part of object.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Give two or more real cenario of virtual function and vertual object
When not to use object oriented programming?
What is encapsulation in simple terms?
What is super in oop?
Which is better struts or spring?
Why is there no multiple inheritance?
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.
What is a class and object?
How do you use inheritance in unity?
What is a function in oop?
What is and I oop mean?
What is the types of inheritance?
What is abstraction example?
What is object in oop with example?
What are objects in oop?