How to recognize C pointers?

I have worked a lot with pointers, but still, when I work with them, I feel that it may not work as I expect. My mind is not sure how they will behave.

What are you offering? I want to study pointers better.

+3
source share
8 answers

The best way is to write programs. Grasp K&R, learn the basics, and start writing some programs.
Possible problems may be:
1) a separate list of links, a double list of links.
2) The main issues of the tree.
   - insert the value into the tree.
   - find height, depth, remove tree, etc.

+7
source
+7

" C" .

5 . , , , , , . , .

+3

, - , .. ( ++, "", C). prereq, , . , , , , - ? ? , , ! -).

, , , -, , " " " a node node" , . ( - , ..., , ++ , "" ! -).

+2

- - . , , ( ) , , , , , . , , , , , - .

, , , ( .)

,

+1

Duleb, .

, , , , , , .

, , , .

, , , , . , , , .

+1

- . , , .

+1

, , , , .

, ints 1 int times , - , , - , (?) zen C.

? void. , , , .

In the end, all the smoke and mirrors - find out your hard types - and remember a bit in your memory. Pointers are less falsified than ints or characters, and the void pointer is the cleanest of all.

I think this is something that every programmer knows, but few understand.

0
source

Source: https://habr.com/ru/post/1722195/


All Articles