title: typcasting a character array to a const char *
body: <p>I have a character arraym
  char Input[200];</p>
  
  <p>input as of now has the string "abc.txt".</p>
  
  <p>I have a method that strictly needs a const char *, how can I convert my input array into a const char *.</p>
  
  <p>I tried casting it, and passing it, but upon using GDB, I feel like since the remaining 192 slots in input are filled with garbage(or are empty)its not being accepted by the function. When I pass the string literal "a.txt" to the function it works. so at this point I would like to extract the filled up elements from input array and convert it to a const char *.</p>
  
  <p>I am taking input as a filename from a user, so I used a char array to store the input.</p>
  
  <pre><code>   int main()
      {
      char *name;
  
      char input[1024];
      strcpy(input, argv[1]);
  
      name = input;
  
      sys_open(input, "O_RDWR", 00700);
  
  
      }
  </code></pre>