我已经尝试了所有方法,但仍然不明白如何编写此代码
#include<stdio.h>
#include<string>
#pragma warning(disable : 4996)
using namespace std;
int main()
{
char str[50] = "Hello word";
int index,i;
printf("The given string is =%s\n", str);
while (str[i] != ' ')
i++;
index = i;
printf("After reversing string is =%s", strrev(str));
return 0;
}