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

No its invalid.A variable declared as static cannot be
changed though it is a global variable.

Is This Answer Correct ?    20 Yes 3 No

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

Answer / anil

variable/function defined static make the scope limited to
only the file in which it is defined and cannot be accessed
outside the file. Hence it is invalid

Is This Answer Correct ?    6 Yes 0 No

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

Answer / sumit mondal

yes of course it is valid.

Is This Answer Correct ?    6 Yes 5 No

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

Answer / guest

yes

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Interview Questions

Write a C program to fill a rectangle using window scrolling

1 Answers  


What are advantages and disadvantages of recursive calling ?

12 Answers   College School Exams Tests, Evolving Systems, HP, Jyoti Ltd, Sage, Wipro,


any string of bits of length 'n' represents a unique non- negative integer between.............?

2 Answers  


What is a floating point in c?

0 Answers  


Where are local variables stored in c?

0 Answers  


What is the real time usage volatile?

2 Answers   Polycom,


What is echo in c programming?

0 Answers  


what is the use of #pragma pack, wer it is used?

2 Answers   Wipro,


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


What does malloc () calloc () realloc () free () do?

0 Answers  


Why functions are used in c?

0 Answers  


What is a char in c?

0 Answers  


Categories