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
What is the use of setfill in c++?
What are the advantages of using pointers in a program?
How a modifier is similar to mutator?
How do I use turbo c++?
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?
What is constructor in C++?
What is the use of vtable?
When is the destructor called?
What is a local reference?
Can a program run without main in c++?
Specify different types of decision control statements?
How does c++ structure differ from c++ class?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Are c and c++ similar?