Where are Local, Global, Static, Extern variables stored ?


  • Local variables are stored in Stack
  • Global variables are stored in BSS
  • Static variables are stored in BSS
  • Extern variables are stored in data segment
  • malloc, calloc and realloc variables are stored in heap

No comments:

Post a comment