what is difference between static and non-static variables
Answer Posted / daxini
Static :
A static variable is defined for the class itself and exists independently of any object of that class.
non-static:
a non static variable is defined for object of the class thus it is bound to an instance of its class
Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
What is the difference between public and private data members?
What will happen if a pointer is deleted twice?
What is an arraylist c++?
Differentiate between a constructor and a destructor in c++.
What is the difference between the compiler and the preprocessor?
List the types of polymorphism in c++?
Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300â€Â,â€ÂBullCart : 10â€Â) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side
Why Pointers are not used in C++?
What is a down cast?
Describe protected access specifiers?
What is the difference between a reference and a pointer?
Write a program to find the Fibonacci series recursively.
Which one is a preferred language C or C++? Why?
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
What is iomanip c++?