title: Trying to insert element in an array using pointers, but not successfull
body: <p>Help me out....There is no compile time error but there is some logical error which i am not able to sort out.
  Input is taken from user without any problem but the elements are not getting inserted.
  Output is unchanged array that user inputted.</p>
  
  <pre><code>void insert(int*,int);
  
  void main()
  {
      int a[10];
      int i,n,pos,x,j,z;
      clrscr();
      printf("Enter Size Of an array: ");
      scanf("%d",&amp;n);
      printf("Enter Elements of an array: ");
      for(i=0;i&lt;n;i++)
      {
          scanf("%d",a+i);
      }
      insert(a,n);
      printf("\nArray after Insertion of elements at 2nd &amp; 5th Position\n");
      for(i=0;i&lt;n;i++)
      {
          printf("\t%d\t",*a+i);
      }
      getch();
  }
  
  void insert(int *b, int n)
  {
      if(n&gt;=1)
      {
          printf("Insert Element at 2nd Position: ");
          scanf("%d",b+1);
      }
      if(n&gt;=4)
      {
          printf("Insert Element at 5th Position: ");
          scanf("%d",b+4);
      }
  }
  </code></pre>