StringRevertRecursive.c
Dosyayı İndir
#include <stdio.h>
#include <locale.h>
#define REVERSE_LENGTH 7
void revert(char *,char *);
int main0902(){
setlocale(LC_ALL,"Turkish");
// Girdi
char string[]="GODORO";
// ��kt�
char reverse[REVERSE_LENGTH]="";
// Bul
revert(string,reverse);
printf("Sicim: %s \r\n",string);
printf("Tersinmi�: %s \r\n",reverse);
return 0;
}
void revert(char *string,char *reverse){
static int i=0;
if(*string){
revert(string+1,reverse);
reverse[i++] = *string;
}
}
Dosyayı İndir