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

I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

621


Give 10 points of differences between C & C++.

637


how to access grid view row?

1819


Explain the difference between new() and malloc() in c++?

632


What are the uses of typedef in a program?

620






Write a recursive program to calculate factorial in c++.

619


What is the rule of three?

578


What is the main function c++?

617


What is data binding in c++?

512


What is this weird colon-member (" : ") syntax in the constructor?

553


Is it possible to get the source code back from binary file?

725


What is a container class? What are the types of container classes in c++?

685


Is set c++?

583


What is function prototyping? What are its advantages?

601


what do you mean by volatile variable?

598