codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
/* strtok example */ #include <stdio.h> #include <string.h> int main () { char str[] ="Hello World && How are u doing && more words & bla &"; char * pch; char* s = str; while ((pch = strstr(s, "&&")) != NULL) { *pch = 0; printf("%s\n", s); s = pch+2; } printf("%s\n", s); return 0; }
Private
[
?
]
Run code
Submit