what is difference between static and non-static variables
Answer Posted / narender vadhava
static variables have their fix values within a program but
in case of non-static variables their values are changable
within the same program.
syntax of static variable:-
static int s;
while
non static variables declared only by using general basic
data type.
as:-
int s;
Is This Answer Correct ? | 14 Yes | 12 No |
Post New Answer View All Answers
Does a derived class inherit or doesn't inherit?
Define namespace in c++?
Why is main function important?
Why is "using namespace std;" considered bad practice?
What is a local reference?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
Which operator cannot overload?
How should runtime errors be handled in c++?
What is endl?
Describe protected access specifiers?
What is an undefined behavior and sequence points
What is the use of object in c++?
What is the meaning of string in c++?
What are the benefits of operator overloading?
What do nonglobal variables default to a) auto b) register c) static