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

Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

0 Answers  


What is %s and %d in c?

0 Answers  


What is Generic pointer? What is the purpose of Generic pointer? Where it is used?

3 Answers  


difference between c and c++?

2 Answers  






What is the difference between char array and char pointer?

0 Answers  


Write a program that his output * *** *****

1 Answers  


Stimulate calculators to perform addition,subtraction,multiplication and division on two numbers using if/else statement?

1 Answers   IBM,


How to write a C program to determine the smallest among three nos using conditional operator?

2 Answers   Google,


How can you increase the size of a dynamically allocated array?

0 Answers   TISL,


What is an auto variable in c?

0 Answers  


Is there sort function in c?

0 Answers  


Categories