《C和指针》学****备忘
Given the previous foundation, this article only records some previously neglected and valuable knowledge.
not repeat the calculation.
The form of sizeof x is allowed. Sizeof () does not evaluate an expression, so the A in sizeof (a=b+l) is not assigned.
The pointer to the member access structure only.
Sixth chapter pointer
Uninitialized pointers can cause errors. Int *a; *a = 12, which makes the contents of the a pointing address be modified, and the result is unpredictable.
The author thinks that such as search elements not found when the return value is NULL while the pointer is commonly used techniques of C, but contrary to the principles of software engineering: "with a single value of two different meanings is a dangerous thing, because the future is very easy to make clear what is really meant it”. The security policy is to return two values indicating whether the state value of the success and the value of the element found during the lookup are successful.
Seventh chapter function
A prototype declaration of functions without arguments should be written like this: int func (void): the purpose is not to be confused with old style declarations.
Recursion solves problems more clearly than non recursion,
For a complex problem that is difficult to implement in iterative form, the simplicity of recursive implementation can compensate for the overhead it
《C和指针》学习备忘 来自淘豆网www.taodocs.com转载请标明出处.