split the string into words using pointer
Answers
Answered by
1
Answer:strtok returns a pointer to the character of next token. So the first time it is called, it will point to the first word. In the next call to strtok , the first parameter needs to be NULL so that strtok starts splitting the string from the next token's starting position it remembers. ptr = strtok(NULL, delim)
Explanation:
Answered by
0
INPUT
- name( first_name<space>last_name): Graham Bell
OUTPUT
- first name: Graham
- last name : Bell
Similar questions
Business Studies,
22 days ago
English,
22 days ago
Math,
22 days ago
English,
1 month ago
Math,
9 months ago