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

What is the acronym for ansi?

0 Answers  


What is c standard library?

0 Answers  


Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"

0 Answers  


Is c easier than java?

0 Answers  


Write a small C program to determine whether a machine's type is little-endian or big-endian.

5 Answers   nvidia,






what is the difference between getch() and getche()?

7 Answers   Infosys,


Which is better oop or procedural?

0 Answers  


How can I increase the allowable number of simultaneously open files?

1 Answers   ABC,


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

0 Answers  


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

0 Answers   Wilco,


What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?

0 Answers  


print the table 5 in loops

3 Answers  


Categories