Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What does static mean in c?



What does static mean in c?..

Answer / sasi

Whenever Static is used with a Variable declaration .. it defines that the last updated value of the Variable will not be deleted after the process of a program .
Eg : #include <stdio.h>
int main() {
func();
func();
func();
}
void func() {
static int i=2;
i=i+1;
printf("%d
",i);
return 0;
}
Output :
3
4
5

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

if function is declared as static in one source file, if I would like to use the same function in some other source file...is it possible....how ?

2 Answers   NetApp,


is it possible to create your own header files?

0 Answers  


What is the difference between #include <header file> and #include “header file”?

0 Answers  


What is meaning of "Void main" in C Language.

24 Answers   Ford, GU, HCL, IBIBS, JUW, TCS,


Why we use void main in c?

0 Answers  


How does free() know explain how much memory to release?

0 Answers  


In scanf h is used for

4 Answers   BFL,


Apart from dennis ritchie who the other person who contributed in design of c language.

0 Answers  


Why c is a procedural language?

0 Answers  


What is a pointer?

1 Answers   ADP, IFFCO,


What is the difference between ‘g’ and “g” in C?

1 Answers  


What are the Advantages of using macro

0 Answers  


Categories