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 diff b/w static and non static variables in C.
Give some examples plz.

Answer Posted / anil kumar

Static variables are used for internal contextual
communication purpose.
non static variables are not used for contextual
communication
for that please go through the below code:

static int i=10;
int main()
{
int x=20;
Printf(“%d %d”,x, i);
Fun();
return 0;
}
Void Fun()
{
Printf(“%d”, i);
}

In the above code “i” is the static variable and “x “is the
local variable

Is This Answer Correct ?    22 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum length of an identifier?

1146


What are the benefits of organizational structure?

979


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

2128


What is d scanf?

1031


How can you find the day of the week given the date?

1156


What are static variables in c?

1036


What does main () mean in c?

1066


Explain how do you declare an array that will hold more than 64kb of data?

1406


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1204


What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?

1407


What is local and global variable in c?

1145


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

3485


What is meant by initialization and how we initialize a variable?

1010


program for reversing a selected line word by word when multiple lines are given without using strrev

2440


What math functions are available for integers? For floating point?

1092