What is meant byStatic Variable ?

Answers were Sorted based on User's Feedback



What is meant byStatic Variable ?..

Answer / swetcha

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

What is meant byStatic Variable ?..

Answer / mahendra giri

static variable or method is not accessable outside the
class where it has been declared.

Is This Answer Correct ?    3 Yes 3 No

What is meant byStatic Variable ?..

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

What is meant byStatic Variable ?..

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

What is meant byStatic Variable ?..

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

What is meant byStatic Variable ?..

Answer / manikandan

more difference b/w xp& win98

Is This Answer Correct ?    0 Yes 2 No

What is meant byStatic Variable ?..

Answer / addy

static variable means who's value is constant through out
the program.

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More Programming Languages AllOther Interview Questions

how can we implement locks in plsql?

0 Answers  


i am exeprienced person what is selection process

0 Answers   BitWise,


cgi stands for

2 Answers   CGI,


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?

1 Answers  


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

0 Answers  


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.

0 Answers  


How to print No.of.rows affected after updation using ADO.Net

0 Answers   Tech Mahindra,


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

0 Answers  


what is difference between restoring and non restoring division?

2 Answers   Texas,


What is the entry point function of a DLL?

0 Answers   Wipro,


Is strus threadsafe or not?

1 Answers  


Categories