title: c - global variables in pthreads
body: <p>Suppose I defined a function in file function.c, and in main.c I create multiple pthreads to execute the function in function.c.</p>
  
  <p>If in function.c, I define a global variable, for example, int foo;</p>
  
  <p>Then, my question is, does every thread has its own instance of this variable "foo" or do they share a single "foo"?</p>