If the static variable is declared as global,
will it be same as extern?



If the static variable is declared as global, will it be same as extern?..

Answer / venkat

static :if i declare the static varible as global that
variable i can acces only with in the file (i.e i can't
access that variable from other file )


extern :if the varible i declared as extern than that extern
variable i can acces from other file also

Is This Answer Correct ?    29 Yes 4 No

Post New Answer

More C Interview Questions

Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


how to connect oracle in C/C++.

3 Answers   TCS, Wipro,


Did c have any year 2000 problems?

1 Answers  


Is c still used?

1 Answers  


prototype of sine function.

2 Answers   Cadence,


Reverse the part of the number which is present from position i to j. Print the new number. eg: num=789876 i=2 j=5 778986

1 Answers  


Explain the difference between null pointer and void pointer.

0 Answers   TCS,


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

1 Answers  


What are the preprocessors?

9 Answers   HP,


How can I read a binary data file properly?

1 Answers  


What is the difference between NULL and NUL?

1 Answers   Aspire, Infogain,


What is array of structure in c?

1 Answers  


Categories