Question: do threads share global variables?
Answer: Heap - Since global variable is stored in the heap, heap is shared among threads. ... Code - Threads can have different code, so sharing code is not always the case. Data - Unsure about what to consider under data. But sure that global variables are shared among threads.