1

I'm trying to put a String into an array in C but I'm starting in this language and I very don't know how to do it. The separator is " ".

char *str = "this is my string"

This array is going to be like that:

arr[0] = this
arr[1] = is
arr[2] = my
arr[3] = string

I want a function that I can use everytime I need to do this.

Thanks guys.

Dan Dinu
  • 32,492
  • 24
  • 78
  • 114

0 Answers0