Why I can not program my own code if I don't look at other's code.
How can I program by myself and not look at the book. Thank you.
The C language is relatively terse, and a perfectly sensible
"utterance" in C may look like a random string of gibberish to the
unpracticed. When you're just beginning, code like `while(*p++=*q++);'
may be difficult to understand, and it even has a tiny trap that could
lead your understanding astray!
But practice will improve your skill in reading C, and you will
get that practice by reading others' code and reading code in books
(unless you're unlucky enough to read bad books or bad code, of
course; there is unfortunately no shortage of either). In a fairly
short time you will become able to read most C with reasonable ease,
and will only need to open the book in extreme cases. Trust me: This
skill *will* come, and it will come sooner than you imagine if you
read good code frequently.
Another effect is that reading good code will improve your own
writing of code: You will learn what some call C's "idioms" and when
to use them as building blocks in your own constructions. You will
learn how to write more clearly, to communicate your code's intent
to future readers (including yourself in six months' time) who may
be trying to figure out what your code is supposed to do as opposed
to what it actually does ...
So, all I can suggest is that you stick with it. Skill will come
with practice, and you will become more self-sufficient as your skills
improve. Good luck!