title: a variable/function can be declared any number of times but it can be defined only once
body: <p>a variable/function can be declared any number of times but it can be defined only once.
  What does that actually mean??</p>
  
  <p>I tried to understand that statement on online compilers and I was expecting to show error but it didnt. </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  int x=10;
  
  int main() {
      x=20;
      x=30;
  
      printf("%d",x);
  }
  </code></pre>
  
  <p>expected output: i expected to show error because i have defined variable x and assigned three different values 10,20,30. the concept says you can declare variable any number of times but can define only once since two different locations cant be given to the same variable
  actual output: 30</p>