由买买提看人间百态

topics

全部话题 - 话题: born2c0de
(共0页)
t*i
发帖数: 72
1
来自主题: Programming版 - string reverse
Could someone explain the program to me.
void ret_str(char* s)
{
if(*s != '\0')
ret_str(s+1);
cout<<*(s);
}
int main()
{
ret_str("born2c0de");
return 0;
}
c********x
发帖数: 84
2
来自主题: Programming版 - string reverse
void ret_str(char* s)
{
if(*s != '\0')
ret_str(s+1);
cout<<*(s);
}
int main()
{
ret_str("b"); // ask yourself what would happen
ret_str("bo"); // ask again
...
ret_str("born2c0de");
return 0;
}
(共0页)