I read lot of articles about garbage collection and almost all article tells about heap memory. so my question is \"garbage collection collects stack memory or heap memory or bo
You don't cite any particular technologies, but the use is fairly typical across languages.
The garbage collector only works on the managed heap. There may be multiple heaps in a single process, some of which are not garbage collected.
Variables allocated on the stack are deallocated when a method returns. The garbage colletor will use those variables to find live references, but it will not collect the memory.