Variable-Less String reverse <p>In a recent interview, I was asked a very simple question to reverse a string (not just print) without any extra variable and any in-built function. The closest I could think of is:</p> <pre><code>#include&lt;stdio.h&gt; #include&lt;string.h&gt; int main() { char ch[100]; scanf("%s",&amp;ch); int i=0; while(i&lt;strlen(ch)/2) { ch[i]=ch[strlen(ch)-1-i]+ch[i]; ch[strlen(ch)-1-i]=ch[i]-ch[strlen(ch)-1-i]; ch[i]=ch[i]-ch[strlen(ch)-1-i]; i++; } printf("%s",ch); return 0; } </code></pre> <p>My solution was rejected as I used variable <code>i</code>. How this is even possible without using a counter variable? Is there any other method to solve this?</p> <p><strong>EDIT</strong></p> <p>These were the exact words of question(nothing more or less):</p> <p>Reverse a string without using any variable or inbuilt functions in C.</p>