String Reverse

/*
Exercise 9: Reverse a string with special condition
*/
#include<stdio.h>
#include<conio.h>
int isAlphabet(char);
void swap(char*,char*);

void main(){
	char string[]="a%b@c&d*e";
	int rightEndPos=strlen(string),leftEndPos=0;
	clrscr();
	printf("\nInput String is...%s",string);
	while(leftEndPos<rightEndPos){
		if(!isAlphabet(string[leftEndPos]))
			leftEndPos++;
		else if(!isAlphabet(string[rightEndPos]))
			rightEndPos--;
		else{
			swap(&string[leftEndPos],&string[rightEndPos]);
			leftEndPos++;
			rightEndPos--;
		}
	}
	printf("\nOutput String is...%s",string);
	getch();
}

int isAlphabet(char c){
	if((c >= 'A' && c <= 'Z') ||(c >='a' && c<='z'))
		return 1;
	else
		return 0;
}

void swap(char *c1,char *c2){
	char temp;
	temp = *c1;
	*c1 = *c2;
	*c2 = temp;
}