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 malloc calloc and realloc in c?

1428


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

1932


Why should I use standard library functions instead of writing my own?

1317


List some basic data types in c?

1082


What is c language and why we use it?

1122


What does s c mean on snapchat?

1186


What does typedef struct mean?

1172


What are the key features in c programming language?

1127


What is file in c preprocessor?

1199


What is getch() function?

1109


What is wrong with this declaration?

1159


code for find determinent of amatrix

2018


Can you write a programmer for FACTORIAL using recursion?

1101


What is getch c?

1346


Where are local variables stored in c?

1096