[ create a new paste ] login | about

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

C, pasted on Apr 18:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>

int main(int argc, char **argv)
{
    char strOrigin[] = "Hello World!!!";
    char strToken1[] = "world";
    char strToken2[] = "World";

    char *pStrPos1 = strstr(strOrigin, strToken1);
    char *pStrPos2 = strstr(strOrigin, strToken2);

    printf("pStrPos1 : %s\n", pStrPos1);
    printf("pStrPos1 : %s\n", pStrPos2);

    return 0;
}


Output:
1
2
pStrPos1 : (null)
pStrPos1 : World!!!


Create a new paste based on this one


Comments: