home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.disi.unige.it
/
2015-02-11.ftp.disi.unige.it.tar
/
ftp.disi.unige.it
/
pub
/
.person
/
CataniaB
/
teach-act
/
laboratorio
/
lab-19-4-99
/
ese9.c
< prev
next >
Wrap
Text File
|
1999-05-10
|
327b
|
21 lines
/* Reverse di una stringa - versione ricorsiva (provare
a fare quella iterativa) */
void swap (char a[],int inf,int sup)
{
int app;
app =a[inf];
a[inf]=a[sup];
a[sup]=app;
}
void reverse (char a[],int inf,int sup)
{
if (inf<sup)
{
swap(inf,sup);
reverse(a,inf+1,sup-1);
}
}