الگوریتم وارون یک رشته به زبان (++C)#include<stdio.h>
#include<conio.h>
void reverse(char s[])
{
char ch;
int i,j;
for(i=0;s[i]!='\0';i++);
i--;
for(j=0;j<=i/2;j++)
{
ch=s[j];
s[j]=s[i-j];
s[i-j]=ch;
}
}
void main()
{
char s[]="0123456789";
reverse(s);
clrscr();
printf("%s",s);
}