title: Having Trouble using scanf with char arrays
body: <p>I'm a student learning C, (my previous experience is all python) and am having trouble debugging a program.  The following section in particular has me confused --  I believe I am using scanf or printf incorrectly (and I must use these two, no other functions.)</p>
  
  <p>The intent is to first scan in this string, then pass it into a function do some work on it, but it looks like it is failing at the scan.</p>
  
  <pre><code>#include "stdio.h"
  
  void main(){
      char hexInput[100];
       printf("enter the hexidecimal to be converted");
       scanf_s("%s",hexInput);
       printf("%s\n",hexInput);
  }
  </code></pre>
  
  <p>The above prints null</p>
  
  <pre><code>scanf_s("%s",hexInput);
  printf("%s\n",hexInput);
  </code></pre>
  
  <p>prints an empty line</p>
  
  <pre><code>scanf_s("%s",hexInput);
  printf("%s",hexInput);
  </code></pre>
  
  <p>prints nothing.</p>
  
  <p>Any guidance would be much appreciated.  Generally the input I've been using is a combination of characters and numbers (the project deals with hexadecimal strings), but any string should work with this.  I've been across the web pretty extensively for a solution, I'm sure it's something obvious but I haven't hit on it yet.</p>
  
  <p>I have been using Visual Studio 2008 to compile and debug.</p>