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 is the scope of static variables in c language?



What is the scope of static variables in c language?..

Answer / dhanshri chabukswar

in c language the scope of a static variable depends on where it is declared
void func(){
static int x=0;
x++;
printf("%d",x);
}
scope - is x
out put- 123 if you call func()three times

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are type modifiers in c?

0 Answers  


Which header file should you include if you are to develop a function which can accept variable number of arguments?

0 Answers   TCS, TISL,


what are threads ? why they are called light weight processes ? what is the relation between process and threads ?

1 Answers  


main() {int a=200*200/100; printf("%d",a); }

14 Answers   TCS,


main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }

2 Answers   CSC,


which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma

16 Answers   Accenture, Infosys, TCS, Wipro,


Can you add pointers together? Why would you?

0 Answers  


Explain spaghetti programming?

0 Answers  


What is a pointer and how it is initialized?

0 Answers  


Describe how arrays can be passed to a user defined function

0 Answers  


Differentiate between a for loop and a while loop? What are it uses?

0 Answers   TISL,


What are the __date__ and __time__ preprocessor commands?

0 Answers  


Categories