What is difference between static and global static variable?

What is difference between static and global static variable?

Main difference between static and global static variables are given below:

In context of memory it allocated to static variables only once. 

Static global variable has scope only in the file in which they are declared. outside the file it can not be accessed. but its value remains intact if code is running in some other file 

By:Vivek
Date:2029-12-08 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher