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

write a function signature with various number of parameters.

0 Answers  


What is exception handling? Does c++ support exception handling?

0 Answers  


Will the inline function be compiled as the inline function always? Justify.

1 Answers  


Floating point representation and output seems to be compiler dependent?

1 Answers  


Explain how overloading takes place in c++?

0 Answers  






What do you mean by translation unit in c++?

1 Answers  


What do you know about friend class and friend function?

1 Answers  


Define pre-condition and post-condition to a member function in c++?

0 Answers  


Why is the function main() special?

0 Answers  


Differentiate between the message and method?

1 Answers  


What are the differences between new and malloc?

0 Answers  


What is the v-ptr?

0 Answers  


Categories