Splitting string into words. Word contained in string. C language.
Submitted by admin on Wed, 03/23/2016 - 16:50
We are given 2 strings. We need to split strings into words and find word with minimal length contained in the first string, that is not contained in second string. Use function to check whether string contains a word.
#include <stdio.h> #include <conio.h> #include <string.h> #include <alloc.h> #include <ctype.h> #include <limits.h> char** words(char* str) { char** wrd; int i=0, j, k, l, n; wrd = (char**)calloc(1, sizeof(char*));