How to check whether a string contains a substring in C language

How to check whether a string contains a substring in C language
/*
check if substring is in string or not using C language
*/

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char str[] = "hello world ,lautturi!";
    char needle1[] = "world";
    char needle2[] = "lautturi";
    if (strstr( str, needle1) != NULL) {
        printf(" '%s' is found in string \n",needle1);
    }

    if (strstr( str, needle2) != NULL) {
        printf(" '%s' is found in string \n",needle2);
    }
    else{
        printf("' %s 'is not found in string \n",needle2);
    }
    return 0;
}
So‮u‬rce:www.lautturi.com

output:

'world' is found in string
' lautturi 'is not found in string

Process returned 0 (0x0)   execution time : 0.319 s
Created Time:2017-08-29 04:38:41  Author:lautturi