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