Some people are saying " static variable store its value in HEAP ", and others saying " static variable store store its value in DATA segment". I am totally confused with these conflict answers.
Where exactly static variable stores?. I am expecting an answer with standard reference ( text books, or good author tutorial).
Static variables two types 1) with in function static variable 2) global( outside function ) static variable. Is there any storage location difference between these two type of variables?