Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Strings are hard in C. This kata is not easy for beginner in this language. You could try to practice C-strings in some very basic katas to get more familiar with them.
There are several issues with what you are trying to do:
char
declares a single character, so there is no way you can store a word (ie an array of characters null terminated in C) in it;first_word[]
is syntactically incorrectTo create an array of strings you must allocate memory (using
malloc
orcalloc
) for achar**
(an array of strings), and then allocate again memory for achar*
(= a string) before copying each word you want in it (and still, this cannot be done as easily as in many other languages). I cannot explain everything in detail here, you should make a research with clever keywords (the commands I have mentionned, two dimensional arrays, etc.) on the C online documentation, you will find many resources.