What is meant byStatic Variable ?
Answers were Sorted based on User's Feedback
A static can only be accessed from the function in which it
was declared, like a local variable. The static variable is
not destroyed on exit from the function, instead its value
is preserved, and becomes available again when the function
is next called. Static variables are declared as local
variables, but the declaration is preceeded by the word
static.
Is This Answer Correct ? | 7 Yes | 2 No |
static variable or method is not accessable outside the
class where it has been declared.
Is This Answer Correct ? | 3 Yes | 3 No |
Answer / rutuja gaikwad
static variable is a variable which declared inside class
using keyword static.
its value used only in that class not overall program
example:
#include <stdio.h>
void func() {
static int x = 0; // x is initialized only once
across three calls of func()
printf("%d\n", x); // outputs the value of x
x = x + 1;
}
int main(int argc, char * const argv[]) {
func(); // prints 0
func(); // prints 1
func(); // prints 2
return 0;
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / kanchan
static variables are those which are not change through out
the program and remain constant.
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ahmed eldesokey
static variable :
is initialize while loading the programme in the memory and
doesn't destroyed during the running time.
simply it's loaded in the memory during the lifetime of the
program
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / addy
static variable means who's value is constant through out
the program.
Is This Answer Correct ? | 0 Yes | 6 No |
how can we implement locks in plsql?
i am exeprienced person what is selection process
cgi stands for
Suppose i have all the implementation code required is written in doGet() but my class has doPost() method. i need code implemented in doGet() how can we do that?
What r the attributes using in Win Runner?
0 Answers Tavant Technologies,
hi all, i need ur help in preparing a sql which performs scd2, i mean i have a scd2 mapping i need a sql which can give me same result as scd2 mapping, SRC table: cust_no, loc 01 abc 02 xyz TGT table: pm_ky cust_no loc current_flag 1 01 abc Y 2 02 xyz Y cust 1 has changed his loc to xyz then it loads into TGT table as below, pm_ky cust_no loc current_flag 1 01 abc N 2 02 xyz Y 3 01 xyz Y i need sql to get the above result, hope got me question, Any suggestion will be appreciate.. thanks, Vinod
Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.
How to print No.of.rows affected after updation using ADO.Net
I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution
what is difference between restoring and non restoring division?
What is the entry point function of a DLL?
Is strus threadsafe or not?