Write a function that accepts 2 strings search string and pattern string and returns TRUE if the pattern string is found in the search string and FALSE if the pattern string is not found in the search string

Please also comment the code in other languages below – 

#include

#define TRUE 1

#define FALSE 0

int search(char sentence[], char pattern[]);

int main(){

char sentence[1000];

char pattern[25];

int result;

printf(“Please enter a paragraph not exceeding 1000 characters :”);

gets(sentence);

printf(“\n\n”);

printf(“Please enter the search string :”);

gets(pattern);

result = search(sentence, pattern);

}

int search(char sentence[], char pattern[]){

char *p;

/* The library function strstr searches for the pattern string in the sentence string. If the pattern is found it returns a pointer to the index of the pattern in the sentence. If not it returns NULL

*/

p = strstr(sentence, pattern);

if ( p == NULL ){

printf(“\nThe search string was not found in the sentence\n\n”);

return FALSE;

}

else {

printf(“\nThe search string was found in the sentence\n\n”);

return TRUE;

}

}