what is difference between static and non-static variables

Answer Posted / sengar

static variable will not be change value all time but non
static value can be changed according requirement .
without giving any value static variable automatically
initialize by zero but in non-static case not the same
case.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a multiset c++?

549


What is the use of map in c++?

606


What are pointer-to-members? Explain.

624


Difference between Abstraction and encapsulation in C++?

577


What is #include iostream in c++?

589






What is a pointer how and when is it used?

574


Why do we use classes in programming?

570


What is the full form of ios?

551


How do I get good at c++ programming?

595


What is the extraction operator and what does it do?

612


What is private public protected in c++?

549


Is java as fast as c++?

597


Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1582


How to defines the function in c++?

612


What does I ++ mean in c++?

583