#include<stdio.h>
#include<string.h>
#define MAX_SIZE 1024
int main()
{
char src[MAX_SIZE];
int word_len = 0;
printf("please input sentences:\n");
gets(src);
reverse_string(src,strlen(src));
void reverse_word(char *src)
{
while(*src != '\0')
{
if(*src == ' ')
{
reverse_string(src - word_len,word_len);
word_len = 0;
}
#include<string.h>
#define MAX_SIZE 1024
int main()
{
char src[MAX_SIZE];
int word_len = 0;
printf("please input sentences:\n");
gets(src);
reverse_string(src,strlen(src));
void reverse_word(char *src)
{
while(*src != '\0')
{
if(*src == ' ')
{
reverse_string(src - word_len,word_len);
word_len = 0;
}