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

How can I read and write comma-delimited text?

1010


What are the benefits of c language?

1108


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1170


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1000


Why is extern used in c?

1050


What is a example of a variable?

949


what is the format specifier for printing a pointer value?

970


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

1222


What is void main () in c?

1151


What is ambagious result in C? explain with an example.

2550


Explain what is wrong with this program statement?

1069


What is || operator and how does it function in a program?

1040


How can you allocate arrays or structures bigger than 64K?

1082


What are the types of pointers?

1033


all c language question

2377