title: Passing a pointer (string) to a C function
body: <p>Please read until the end before you say: "Oh no, this question again..."</p>
  
  <p>I am right now seating in a C course and the following example has been provided in course book:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdint.h&gt;
  
  void Terminal_PrintData(uint16_t * const Data);
  
  int main(void){
      uint16_t StringData[] = "MyData";
      Terminal_PrintData(StringData);
  }
  
  void Terminal_PrintData(uint16_t * const Data)
  {
      printf("Value: %s", *Data);
  }
  </code></pre>
  
  <p>When I compile this masterpiece, this is what I get:</p>
  
  <pre><code>F:\AVR Microcontroller&gt;gcc -o test test.c
  test.c: In function 'main':
  test.c:7:26: error: wide character array initialized from non-wide string
    uint16_t StringData[] = "MyData";
  </code></pre>
  
  <p>My questions are:</p>
  
  <ul>
  <li>Is it correct to declare a string with <code>uint16_t</code>?</li>
  <li>What is recommended way to pass a string to a function?</li>
  </ul>