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 are the different properties of variable number of arguments?

1166


What are the string functions? List some string functions available in c.

995


How reliable are floating-point comparisons?

1106


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2432


How can I avoid the abort, retry, fail messages?

1140


Explain how can type-insensitive macros be created?

1001


What is main () in c?

1079


What are identifiers and keywords in c?

1108


What are c preprocessors?

1205


find out largest elemant of diagonalmatrix

2257


How to write c functions that modify head pointer of a linked list?

992


What is the use of c language in real life?

1029


What is the use of function in c?

1197


What is difference between structure and union?

1140


Explain zero based addressing.

1040