title: How to call a global variable in to function in C?
body: <p>I'm starting at the word of programming so I'm reading a book about programming in C, it says that if I want to call a global variable into a function I need to call the global variable with (<code>::</code>) before the name... in terminal shows this:</p>
  <p><strong>funcion2.c:17:57: error: expected expression before ‘::’ token
  17 |         printf(&quot;value of global variable is %d\n&quot;,::k);
  thaks.</strong></p>
  <pre><code>#include &lt;stdio.h&gt;
  void f1(void);
  int K=5;
  void main()
  {
      int I;
      for(I=1; I&lt;=3; I++)
      {
          f1();
      }
      void f1(void)
      {
          int k=2;
          K+=K;
          printf(&quot;VALUE IS: %d\n&quot;,k);
          ::K=::K+K;                        // &lt;-
          printf(&quot;VALUE IS %d\n&quot;,::k);      // &lt;-
      }
  }
  
  </code></pre>