title: How to locally allocate array-pointer in C?
body: <p>Think of a pointer-datatype, for instance to a floating-pointer number.</p>
  
  <pre><code>typedef float* flPtrt;
  </code></pre>
  
  <p>How would I allocate an array of 3 elements in the local scope? I guess using <code>malloc</code> and <code>free</code> withing the same scope produces overhead, but what's the alternative?</p>
  
  <pre><code>void foo() {
      flPtrt ptr = malloc(sizeof(float)*3);
      // ...
      free(ptr);
  }
  </code></pre>