adspace


Difference between static global and global?

Answer Posted / ravi.g

local static variable and global variable both are same
since both can be accessed from all the functions in the
same file in which they declared.

Global variable has the file scope since it can be accessed
from other files also by using extern keyword.

Local static vaeriables have no file scope since they can
not be accessed from other files by any means.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What character terminates all character array strings a) b) . c) END

1429


daily Routine of father

1511


What is the latest version on c++?

1235


Can union be self referenced?

1304


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1200