Reverse a string without strtok in C
问题 Working on a program that uses RPN (Reverse Polish Notation). I have a function that reverses all the words of string without using strtok or triggering printf (unlike all the solutions found online and here). The function actually works partially as it prints all the words of a given string except the last one and I need help figuring out what's going on. char *extract(char s[]) { if (s[0] == '\0') return NULL; int i = 0; char *p = NULL; while (s[i] != '\0') { if (s[i] == ' ') p = s + i; i++