title: How to return a variable name and assign the value of the variable returned in c
body: <p>I want to use a dynamic variable whose value will vary during the run time.</p>
  
  <p>eg</p>
  
  <pre><code>char * aVar = "ABC";
  char * bVar = "DEF";
  char * cVar = "XYZ";
  
  char *dVar = NULL;
  
  dVar = foo1();
  
  print dVar;
  </code></pre>
  
  <p><code>foo1</code> internally calls <code>foo2</code>, which should return the variable names (like <code>"aVar"</code>, <code>"bVar"</code> or <code>"cVar"</code>). <code>foo1</code> should return the value of said variable as named according to <code>foo2</code>'s return value.</p>
  
  <p>to get the variable name we can use (non-standard) macro:</p>
  
  <pre><code>##define GET_VAR(varname) #varname; 
  </code></pre>
  
  <p>... but how am I able get the value of the variable named?</p>