title: Why hex in string is not converted to hex when passed through command line argument?
body: <p>What I understand that hexadecimal numbers can be placed into string using <code>\x</code>. For example <code>0x41 0x42</code> can be placed in string as <code>"\x41\x42"</code>.</p>
  
  <pre><code>char * ptr = "\x41\x42" ;
  printf( "%s\n" , ptr ) // AB
  </code></pre>
  
  <p><code>\x</code> is discarded and <code>41</code> is considered as a hex by the compiler.</p>
  
  <p>But if I pass it to my program through command line arguments, it does not work.</p>
  
  <pre><code>    // test.c
      main( int argc , char * argv[] ) 
      {
         printf( "%s\n" , argv[1] ) ;
      }
  </code></pre>
  
  <blockquote>
    <p>$ gcc -o prog test.c <br/>
    $ ./prog "\x41\x42" <br/>
    \x41\x42<br/>
    $ .prog \x41\x42<br/>
    \x41\x42</p>
  </blockquote>
  
  <p>What I expected was <code>AB</code> like in the example 1. <br/>
  Why is it so? Why this method of representation does not work in case of command line arguments?<br/>
  How can value in <code>argv[1]</code> which we know for sure is a hex string can be converted to hex number (without parsing, like done in the first example)?</p>
  
  <p>Thanks for your time.</p>