Computer Science, asked by sayeemdar8, 1 month ago

split the string into words using pointer​

Answers

Answered by mayanksaha9125
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 OoINTROVERToO
0

INPUT

  • name( first_name<space>last_name): Graham Bell

OUTPUT

  • first name: Graham
  • last name : Bell
Similar questions