Contact: aviboots(AT)netvision.net.il
40,904 questions
53,356 answers
573 users
#include <stdio.h> int main() { char str[64] = "c c++ c# java php", second_word[24]; int i = 0; while (str[i++] != ' '); int j = 0; while (str[i] != ' ') second_word[j++] = str[i++]; puts(second_word); return 0; } /* run: c++ */
#include <stdio.h> #include <string.h> int main() { char str[64] = "c c++ c# java php"; char *second_word = strtok(str, " "); second_word = strtok(NULL, " "); puts(second_word); return 0; } /* run: c++ */