title: add string to given command line argument in C
body: <p>Hello i just started to programm in C and i am trying to read a file and give the file name as argument without the ending .txt . I want to add .txt in my code : ./myexample.exe file</p>
  
  <p>if i use file.txt there is no problem but i dont know how to change argv[1]
  i tried char *n = argv[1] + ".txt"; it doesnt works and i dont know anything else.. </p>
  
  <pre><code>int main(int argc, char* argv[]) {
        char *n = argv[1] +".txt";
        FILE *fp1;
        fp1 = fopen(n , "r");
  </code></pre>
  
  <p>Thats what i get if i use <code>char *n = argv[1]+".txt"</code></p>
  
  <blockquote>
    <p>error: invalid operands to binary + (have 'char *' and 'char *')</p>
  </blockquote>