Write a function that takes a string as input and returns the string reversed.

来源:互联网 发布:越贵妃知乎 编辑:程序博客网 时间:2024/06/07 11:29

Write a function that takes a string as input and returns the string reversed.

Example:
Given s = “hello”, return “olleh”.

EX:char* reverseString(char* s) {
int i=0;
char *String,*Head,*End,ch;
String=s;
Head=String;
while(*(String+i))
i++;
End=String+i-1;
for(;Head

1 0
原创粉丝点击