need help......................
guys how do i reverse a string array without using the strrev function.
my codes wont work.
if you are allowed to create another string array
1 2 3 4 5 6
|
char x1[3]="abc";
char x2[3];
for (i=0; i<3; i++)
{
x2[3-i]=x1[i];
}
|
x2 will then hold the reversed string
hope this helps
Topic archived. No new replies allowed.