title: Can functions declared in main access variables declared in main?
body: <p>I have an array that I declared and initialized in main called Edges.</p>
  
  <p>I have also declared some functions in main that access the array called Edges. </p>
  
  <p>The code compiles and works. </p>
  
  <p>Why does it work? I thought variables declared in main aren't global. </p>
  
  <p>Edit: see Sourav's code.</p>