title: unable to get filename from argv[1] in C
body: <p>I'm trying to make a program which makes a copy of the file you put in, only then with a reversed filename (eg. input.txt = txt.tupni). 
  I start my program with </p>
  
  <pre><code>int main(int argc, char **argv) {
  </code></pre>
  
  <p>When I use <code>printf("%s",argv[1])</code> I can see the file name which has been put in. However, when I try to manipulate it I can't get it to work. 
  <code>char name = argv[1]</code> doesnt work,
  neither does <code>char name[] = argv[1]</code> work</p>
  
  <p>All I want is either a char array or a piece of malloc memory which has all of the characters.</p>