title: C programming to increase the size of a string
body: <p>So I wrote this code but it gives me the same answer everytime. I am increasing the memory allocated to the pointer in steps of 4 and then print the value.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(void) {
      int n=0;
      char *name = "hello";
      scanf("%d",&amp;n);
  
      for(int i =0; i&lt;n;i++){
          name += sizeof(int);
          printf("%d \n", (sizeof(&amp;name)));
      }
      return 0;
  }
  </code></pre>
  
  <p>can someone help me? I don't know whats wrong here. I don't need a different code, I just want to understand what's wrong with this.</p>