KyaPoocha.com

Huge Collection of Interview Questions


What do you mean by static and local variable? 

Static variable is not created on function stack but is created inthe initialized data segment and hence the variable can be shared across the multiple call of the same function. Usage of static variables within a function is not thread safe.
On the other hand local variable or auto variable is created on function stack and valid only in the context of the function call and is not shared across function calls.



If you liked this question/asnwer, make sure you
Subscribe to KyaPoocha.com RSS feed!


BOOKMARK THIS : BlinkList | del.icio.us | Digg it | Furl | reddit | StumbleUpon | Yahoo MyWeb |