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 |
what is programming language?
what are the steps for creating prompt table dynamically for the specified field
i am exeprienced person what is selection process
we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/
When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)
I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
9. Read the function conv() given below conv(int t) { int u; u=5/9 * (t-32); return(u); } What is returned (a) 15 (b) 0 (c) 16.1 (d) 29
can any method return type may be constructor , or that method name allow
Explain polymorphism. Provide an example.
Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.
what is the difference between uservariables and systemvariables (in Environmental variables)???