title: Add leading Zeros to integer doesn't work (arduino, c)
body: <p>I want to convert, for example, the number 12 to 0012. So that the number is always 4 characters long. I tried it with this code:</p>
  
  <pre><code>int number;
  int result;
  
  void setup() {
      number = 12;
      Serial.begin(9600);
      result = printf("%03d", number);
  }
  
  void loop() {
      Serial.println(result);
  }
  </code></pre>
  
  <p>However this code outputs only -1 instead of 0012.  What is wrong with this code?</p>