title: Repeat and print a character in the shortest number of characters in C
body: <p>Currently, I am attempting to repeat a single character in the least characters possible. as an example, I am  actually using something similar to this to repeat a series of spaces:</p>
  
  <pre><code>printf("%*s",i,"");
  </code></pre>
  
  <p>And I was wondering if there was a similar, or even shorter/different way in C to repeat a string and print it out, as with the spaces. </p>
  
  <p>I would like something similar to this if possible:</p>
  
  <pre><code>printf("%*s",i,"_");
  </code></pre>
  
  <p>However, as far as I know, that's not possible, however ideal it would be for me.</p>
  
  <p>To clarify, in these examples the argument i represents the number of times I would like the character to repeat, i.e, the second example should output (if i was say, 12):</p>
  
  <pre><code>____________
  </code></pre>
  
  <p><strong>NB:</strong> It does not necessarily have to be anything related to printf, however, it does have to be short.</p>
  
  <p>Essentially, I would like to repeat one character a specified number of times and then output it.</p>
  
  <p>Edit: I am currently using a for loops which allows me 31 characters, however by using a method similar to the above, I can cut down another 7 characters on top of that, due to the way the program is structured. So a loop is not really ideal.</p>