The first sentence is incorrect for any compiler I've ever seen, and that's a bunch. As has been said, the C standard doesnt' say where _any_ variables live. So you can only ask the question with respect to certain compiler.
On Sep 2, 1:57 am, aditya kumar <aditya.kumar130...@gmail.com> wrote: > static variables are allocated on heap . and global variables are sored on > data segment > > On Fri, Sep 2, 2011 at 9:30 AM, rahul sharma <rahul23111...@gmail.com>wrote: > > > > > static variable is stored in data segement so it is alive thorugh the > > prog....go through let us c : data types > > > On Wed, Aug 31, 2011 at 10:16 PM, Swathi <chukka.swa...@gmail.com> wrote: > > >> C standard doens't fine where it has to be stored.. go through this URL > > >>http://www.velocityreviews.com/forums/t443436-where-is-a-static-varia... > > >> On Wed, Aug 31, 2011 at 9:57 PM, rohit <raman.u...@gmail.com> wrote: > > >>> Where does a static variable get allocated in memory..? > >>> Like automatic variables get stack, objects allocated through > >>> malloc/calloc get memory from heap...wt abt static variable? > > >>> -- > >>> You received this message because you are subscribed to the Google Groups > >>> "Algorithm Geeks" group. > >>> To view this discussion on the web visit > >>>https://groups.google.com/d/msg/algogeeks/-/5Wj2C8yF74QJ. > >>> To post to this group, send email to algogeeks@googlegroups.com. > >>> To unsubscribe from this group, send email to > >>> algogeeks+unsubscr...@googlegroups.com. > >>> For more options, visit this group at > >>>http://groups.google.com/group/algogeeks?hl=en. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Algorithm Geeks" group. > >> To post to this group, send email to algogeeks@googlegroups.com. > >> To unsubscribe from this group, send email to > >> algogeeks+unsubscr...@googlegroups.com. > >> For more options, visit this group at > >>http://groups.google.com/group/algogeeks?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Algorithm Geeks" group. > > To post to this group, send email to algogeeks@googlegroups.com. > > To unsubscribe from this group, send email to > > algogeeks+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/algogeeks?hl=en. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.