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

Differentiate between an array and a list?

946


What is iomanip c++?

820


What are the various access specifiers in c++?

803


How do I tokenize a string in c++?

823


What is the use of endl in c++ give an example?

880


What is a pdb file?

753


How many static variables are created if you put one static member into a template class definition?

776


Explain how overloading takes place in c++?

772


List the merits and demerits of declaring a nested class in C++?

800


What is encapsulation in c++?

932


what you know about c++?

871


Can comments be nested?

816


Describe Trees using C++ with an example.

854


Is c++ the hardest programming language?

846


Tell me what are static member functions?

817