Back to Browse

strtok function in c | split string in c PART 2

443 views
Jul 5, 2022
3:55

Remember to include string.h library. int main() { //Introduction to strtok function char str[20] = "HEY,HOW,ARE,YOU?"; char* ele = strtok(str, ","); while(ele != NULL){ printf("%s\n",ele); ele = strtok(NULL,","); } printf("%s\n",str); return 0; } #cprogramming #cprogrammingtutorial #strings

Download

0 formats

No download links available.

strtok function in c | split string in c PART 2 | NatokHD