S
Suraj
I know a local static variable's (declared within a function) scope is
within that function as the name itself would not be available outside
the function.
Also, i know that a static variable declared in global scope is
accessible in all functions.
Are there other differences between these 2? In terms of memory
allocation, performance etc?
static variables are not stored in stack or heap. plus the lifetime is
throughout the life of the program
I hope this isn't too naive to irritate the group
Thanks,
Suraj
within that function as the name itself would not be available outside
the function.
Also, i know that a static variable declared in global scope is
accessible in all functions.
Are there other differences between these 2? In terms of memory
allocation, performance etc?
static variables are not stored in stack or heap. plus the lifetime is
throughout the life of the program
I hope this isn't too naive to irritate the group
Thanks,
Suraj