0 0 votes Consider storage class of a variable declared as static. Where the memory will be allocated? a)Code segment b)Stack segment c) Heap segment d) Data segment Programming in C + – srestha 510 views answer comment Share Follow Print See 1 comment 1 1 comment reply Prashant. commented Aug 6, 2016 reply Follow flag http://stackoverflow.com/questions/8387989/where-is-a-static-method-and-a-static-variable-stored-in-java-in-heap-or-in-sta 1 1 replyShare Please log in or register to add a comment.
Best answer 1 1 vote Data Segment. Data segment is also divided into 2 segments ==> initialized data segment and uninitialized data segment(also known as bss segment). Have a look at this ==> http://stackoverflow.com/questions/14588767/where-in-memory-are-my-variables-stored-in-c Kapil answered Aug 6, 2016 • selected Aug 6, 2016 by srestha Kapil comment Share Follow 0 reply Please log in or register to add a comment.