Monday, July 28, 2008

C Source Code for reversing a string.

void ReverseString( char str[]) {

int start =0 ;int end = strlen(str)-1;
while(start < end) {

char ch = str[start];
str[start] = str[end];
str[end] = ch;

start++; end--;
}
}

No comments:

Your Title