C string input without spaces or tabs : I am trying to find the best way of getting an input of string without the spaces and tabs. And from it to get dynamic number of the individual strings that the main one contian.

For example:
For the string str = "    abc  \t tt    6  \t   4 7"

The out put will be str1 = "abc" str2 = "tt" str3 = "6" str4 = "4" str5 = "7"

I thought maybe for the dynamic creation of string to use malloc to creat an array of strings. But I could not make it work, and ignore the spaces and tabs (\t)

Thanks for the helpers.