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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the test cases for checking a variable having value in range -10.0 to +10.0?

2316


What is the advantage of using #define to declare a constant?

1093


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1097


What is use of null pointer in c?

1007


What is build process in c?

1147


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

1151


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

1050


How can I write a function that takes a format string and a variable number of arguments?

1051


How do I swap bytes?

1067


Why n++ execute faster than n+1 ?

2987


how to capitalise first letter of each word in a given string?

1922


Explain how can type-insensitive macros be created?

988


What are linker error?

1088


Explain how are 16- and 32-bit numbers stored?

1264


Explain spaghetti programming?

1243