#define _CRT_SECURE_NO_WARNINGS#include#include int reverse(char *begin, char *end){ char temp; if (begin == NULL || end == NULL) { return 0; } while (begin < end) { temp = *begin; *begin = *end; *end = temp; begin++; end --; } return 0;}int reverse_process(char *data){ char *begin; char *end; begin = end = data; while (*end != '\0') { end++; } end--; reverse(begin, end); begin = end = data; while (*begin != '\0') { if (*begin == ' ') { end++; begin++; continue; } else if (*end == ' '||*end == '\0') { reverse(begin, --end); begin =++end; } else end++; }}int main(){ char data[] = "i am a teacher"; reverse_process(data); printf("%s", data);}