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

If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com

0 Answers  


hi friends please tel me how to handle the recovery manager(All i.e PopUp ,Application Crach ,Object state,etc) in QTP

1 Answers   IBM,


what is the basic and unique feature of dotnet

0 Answers   HCL,


what are the missinschema properties and should we pass primary key in select command

0 Answers  


When we have more than one main function in a program how does the compiler know the starting point of the program, i mean from which main the execution or compilation of the program begins?

2 Answers   247Customer,


how can i create report in abap to insert data in table pa0002 using insert command

0 Answers  


Crystal report proffessional 9 to filter the issue date!!

1 Answers  


iam confused among testing ,.net and java. can anybody help me.

0 Answers  


what are partial classes. Where is the entry point of partial classes.

1 Answers   Satyam,


What do you meant by Runtime Polymorphism?

2 Answers   Persistent,


What is procedural oriented language language..? give some examples of this language....?

0 Answers  


what is the current salary package in India for a lamp programmer

0 Answers   HCL,


Categories