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...

in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?

Answer Posted / dipti

No its in valid as a static variable cannot be declared as extern.
The whole and entire purpose of static is to declare that a variable is private to the source file that it is declared in.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what type of questions arrive in interview over c programming?

2032


How is = symbol different from == symbol in c programming?

1050


Explain what is a static function?

1112


What is unary operator?

1108


Do you know null pointer?

1029


Is calloc better than malloc?

1023


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

2003


Is null always defined as 0(zero)?

1116


Is it possible to initialize a variable at the time it was declared?

1220


Explain the red-black trees?

1132


What does calloc stand for?

1167


Explain how do you sort filenames in a directory?

1043


How to throw some light on the b tree?

1090


When is a “switch” statement preferable over an “if” statement?

1152


What are static variables in c?

1084