hey all i finally got it, here's the solution, thnx for all help so far:
Code:
#include <stdio.h>
#define SIZE 6
int palindrome( char string[], int start, int end );
int main()
{
char string[ SIZE ] = "radar";
if ( palindrome( string, 0, SIZE - 2 ) == 1 )
printf( "It IS a palindrome.\n" );
else
printf( "It is NOT a palindrome.\n" );
getch();
return 0;
}
int palindrome( char string[], int start, int end )
{
int length = 0;
int i = 0;
if ( start == end )
return 1;
while ( string[ i++ ] != '\0' )
length++;
if ( length - 1 == 1 || length - 1 == 0 )
return 1;
else if ( string[ start ] != string[ end ] )
return 0;
else
return palindrome( string, start + 1, end - 1 );
}