title: Open and edit external file which has variable name in C
body: <p>Quick question, since I only managed to find answers on the googlemobil regarding C++: Is there any way to open and edit files in C, where the file has a variable name? </p>
  
  <p>Let's make it a bit clearer: I have a prompt, which checks if the user gives a filename or not. If no filename has been entered, the program automatically opens a <code>client.conf</code> file I created in the same directory; now this was the easy part of the if-else statement.</p>
  
  <p>However, IF a name has been given, how do I make my program create a file <code>givenInput.conf</code> in the same directory, and send data to it? I suppose the r/w interaction would be the same as with the first case of the if-statement, using <code>fopen()</code>, however <code>fopen()</code> uses as first parameter const char *restrict filename, and I am trying to make something for chars that are NOT constants...</p>
  
  <p>In C++ there is a way to bypass this by creating a separate (empty) array, pasting the input and then just adding the string suffix to it; also, it uses a C++ specific function (whom name I forgot, sorry ^^) to parse the variable filename....</p>
  
  <p>Any ideas how to manage this in regular, plain good'ol C? I'm new to the C programming language, please be gentle for a newbie ;)</p>