i am writing a program in which i am checking if a string contains another string(same what strstr does).
i assumed intially that the string1 is a long string with spaces and string2 is a word(which might be or might not be present in string1)
i have used strtok to seperate the words in string1 to be checked using strcmp.
its a very simple logic, but the problem is its showing segmentation fault.
can anyone find me a solution.