title: Input non-printable ascii characters into scanf
body: <p>So I've seen these two questions: </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/18945448/input-string-with-non-printable-chars">Input string with non printable chars</a></li>
  <li><a href="https://stackoverflow.com/questions/15123963/inputting-non-ascii-characters-to-scanfs">Inputting Non ASCII characters to scanf(&quot;%s&quot;)</a></li>
  </ul>
  
  <p>And unfortunately these did not provide me for an answer I've needed
  let's say I'm dependent within some output of a certain program and can't tell for sure which values I need to enter ahead of program's execution, I'd rather enter some input for example for this code: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char a[10] = {0};
      printf("\n----------- %x\n", (unsigned int) a); 
      scanf("%s", a);
      for(int i = 0; i &lt; 10;  i++)
          printf("%d\n", (int) a[i]);
  }
  </code></pre>
  
  <p>as an example, I'm waiting after the printf within the following program has reached, then</p>
  
  <p>input -> some input containing non-printable ascii characters</p>
  
  <p>program output-> 04
  08
  01
  05
  02
  10
  09
  12
  02
  02 (All these are values of non-printable ascii characters)</p>
  
  <p>and again I'm looking for a way to enter them <strong>directly</strong></p>
  
  <ul>
  <li><strong>I'm not looking for a way to do this by implementing some
  functionality within my code, my code is given as an example of a
  program</strong></li>
  <li><strong>When saying during runtime, I mean after the program has started running - hence the prints within my program have reached</strong></li>
  <li>I apologize if this was unclaer</li>
  </ul>