title: Embedded C Passing a String to function
body: <p>I'm trying to send an array of characters in C, byte by byte to an output for a microcontroller. I'm using the following code:</p>
  
  <pre><code>int main() {
  ...
     LogOutput("Hello World!");
  }
  
  void LogOutput(char *msg) {
  
      int i;
      for (i = 0; i &lt; sizeof(msg); i++) {
          USART0_TX(msg[i]);              // transmit byte
      }
  }
  </code></pre>
  
  <p>However, this only sends the first two letters "He" --- does anybody know what I'm doing wrong?</p>