Swap the 2nd character with the next-to-last <p>I have to change the 2nd letter with penultimate letter for word with more than 3 letters. Example i have this string: Alex are mere<br> The result should be: Aelx are mree<br> But i get this when i run my program: Axel` aler</p> <p>This is the code:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; #include &lt;string.h&gt; int main() { int i,n,j=0; char text[81],cuv[44],l; printf("Introduce-ti textul:"); gets(text); for(i=0;i&lt;strlen(text);i++) { if(text[i] != 32) { cuv[j]=text[i]; j += 1; } else { n = strlen(cuv) - 1; l= cuv[1]; cuv[1]=cuv[n-1]; cuv[n-1]=l; printf("%s ",cuv); strcpy(cuv,""); j=0; } } return 0; } </code></pre>