分类: C/C++
2009-08-03 10:54:34
#include #include #include int main ( void ) { char *p1="This is example"; char *p2="exam"; fprintf(stdout,"OUT1 = %s\n",strstr(p1,p2)); fprintf(stdout,"OUT2 = %d\n",strcmp(p1,p2)); exit(0); } |
#include #include #include int main ( void ) { char *p1="This is example"; char *p2="sss"; fprintf(stdout,"OUT1 = %s\n",strstr(p1,p2)); fprintf(stdout,"%d\n",strcmp(p1,strstr(p1,p2))); exit(0); } |