0 votes 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 srestha asked Aug 6, 2016 srestha 271 views answer comment Share Follow See 1 comment See all 1 1 comment reply Prashant. commented Aug 6, 2016 reply Follow Share http://stackoverflow.com/questions/8387989/where-is-a-static-method-and-a-static-variable-stored-in-java-in-heap-or-in-sta 1 votes 1 votes Please log in or register to add a comment.
Best answer 1 votes 1 votes 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 See all 0 reply Please log in or register to add a comment.