[ create a new paste ] login | about

Link: http://codepad.org/olpKht2c    [ raw code | output | fork ]

kamarakay2000 - C, pasted on Jul 14:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>
#include <string.h>
int main()
{
    char source_string[] = "I am a stranger in a strange land";
    char find_me[] = "strange";//"weirdo";
    if(strstr(source_string,find_me) == NULL)
        puts("string not found!");
    else
        printf("Found '%s'in '%s'\n",find_me ,source_string);
    return(0);
}


Output:
1
Found 'strange'in 'I am a stranger in a strange land'


Create a new paste based on this one


Comments: