What is the difference between static global and global ?

Answers were Sorted based on User's Feedback



What is the difference between static global and global ?..

Answer / leossk

Scope of the static variable is limited to that file, while
global is for all the files in that project space.

Is This Answer Correct ?    5 Yes 0 No

What is the difference between static global and global ?..

Answer / shakti singh khinchi

Scope of static variable is limited to different function
calls for a file, whereas global variable exists in multiple
files.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C++ General Interview Questions

How to declare a function pointer?

0 Answers  


What is a rooted hierarchy?

0 Answers  


Can class objects be passed as function arguments?

0 Answers   HCL,


How to allocate memory dynamically for a reference?

0 Answers  


Is recursion allowed in inline functions?

0 Answers  






What is difference between class and function?

0 Answers  


Who was the creator of c++?

0 Answers  


Explain differences between alloc() and free()?

0 Answers  


Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); a) 10 b) 11 c) 1

4 Answers   Quark,


What is istream c++?

0 Answers  


What is the hardest coding language to learn?

0 Answers  


Is c++ the most powerful language?

0 Answers  


Categories