title: Passing an array to a function and using sizeof in Arduino
body: <p>I'm an Arduino <a href="http://en.wiktionary.org/wiki/padawan#Noun" rel="noreferrer">padawan</a> learner. I want to pass a byte array to a function and get the size of the array.</p>
  
  <pre><code>byte data[] = {
      B00000000,
      B00000001,
      B00000011,
      B00000111
  };
  
  Serial.println(sizeof(data)); // ----------------------&gt; displays 4
  </code></pre>
  
  <p>When I pass it to a function <code>sizeof</code> returns 2. How can I get it to return 4 also in the function?</p>
  
  <pre><code>writeData(data);
  
  void writeData(byte data[]) {
      Serial.println(sizeof(data)); // -------------------&gt; displays 2
  }
  </code></pre>