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 ?

Answers were Sorted based on User's Feedback



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

Answer / vadivel t

No. it is not valid,

Bcos we can not initialise a variable with an extern key
word.ie.,

The statement extern int i = 100; is wrong.

Is This Answer Correct ?    14 Yes 5 No

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

Answer / 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

More C Interview Questions

Explain the bubble sort algorithm.

0 Answers  


Explain the properties of union. What is the size of a union variable

0 Answers  


Are the expressions * ptr ++ and ++ * ptr same?

0 Answers  


What is the best way to store flag values in a program?

0 Answers  


What is the purpose of Scanf Print, getchar, putchar, function?

3 Answers  


size maximum allocated by calloc()

3 Answers   DELL,


what is the role you expect in software industry?

0 Answers   HCL,


Write a program that receives as input a number omaadel-n-print, four digits.

0 Answers  


Differentiate between ordinary variable and pointer in c.

0 Answers  


whitch value return void main?

11 Answers  


Why we write conio h in c?

0 Answers  


Tell me about low level programming languages.

0 Answers   Amdocs,


Categories