Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char* second_word(char text[] )
- {
- char *ptr = text;
- while(*ptr != ' ' && *ptr != ' ' && *ptr != 0)
- {
- ptr++;
- }
- return ++ptr;
- }
- char text[] = "Hello World";
- int main(int argc, char *argv[]) {
- printf("%s" , second_word(text));
- return 0;
- }
Add Comment
Please, Sign In to add comment