title: Making a shape from characters in an array in c
body: <p>I would like to return a shape(trapezium) with bases 6 and 3 given integers 3 and 4 and a char.</p>
  
  <p>I have tried implementing this with code below but I am getting a rectangle instead</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  char my_array[];
  char *ptr;
  int m = 3,n =4;
  
  int main(void)
  {
  int i,j;
  ptr = &amp;my_array[0];
  
  for (j = 0;j &lt; n ;++j)
      {
          for (i = 0; i &lt; m+n-1; i++)
          {
              my_array[i] = '*';
              printf("%c ",my_array[i]);
  
          }
              printf("\n");
      }
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p>I would like to know how I can reduce the length of each row of the result above to get the shape i need.Any ideas?</p>