1 static char *revers(char *s) 2 { 3 int len=strlen(s); 4 char *s2=(char *)malloc(sizeof(char)*(len+1)); 5 for(int i=len-1; i>=0; i--) 6 { 7 switch (s[i]) 8 { 9 case 'A': 10 s2[len-1-i] = 'T'; break; 11 case 'T': 12 s2[len-1-i] = 'A'; break; 13 case 'G': 14 s2[len-1-i] = 'C'; break; 15 case 'C': 16 s2[len-1-i] = 'G'; break; 17 default: 18 break; 19 } 20 } 21 return s2; 22 }