Ex17-can't understand anything

Good evening Zed and the community members.
I am new to programming and i started with C- language.
I was able to wade through all the exercises till ex 16.
But i find ex 17 seeks a different level.
with so many weird concepts.
can you suggest some areas which i should brush upon before getting into this exercise again.
please help!!
@zedshaw

Make sure you understand pointers, arrays and structs.

Other than that, this one is indeed more complex than the ones before, so don’t feel bad about it. Here’s what I would do:

Start by getting a very clear idea of what the program does. Draw it, write a description in your own words (and language).

Then copy Zed’s code one function at a time. Don’t have his version and your editor side by side on your screen: Look at his code, memorize a line, go to your editor, write it down. Go back, check what you wrote. Double-check what you wrote. Triple-check what you wrote.

When you’re sure you have everything exactly as in the book, compile it. Fix remaining errors. Then use the old trick of writing a comment above every (!) line that says what it does. Then draw another diagram of the database, label its parts with the names of Zed’s structs and functions.

When you’ve done all that you’ll have a much better understanding of the whole thing already. Now write down questions about what you don’t get. Be as specific as possible with those. Give your brain a few days to work on those questions on its own. Sometimes it just clicks after a while. Come back here with the questions you can’t answer.

Keep at it! I hope this helps.

1 Like

Thankyou.
I will abide by these points.
@florian