Home > Back-end >  Freshman small white how advanced, learning c
Freshman small white how advanced, learning c

Time:12-29

# # now brush hdu got 100, acm team prepared into the school, but in the process of brush problem, found that less thinking, to see the answer key and don't feel a sense of accomplishment, although looked at other people's code is really beautiful, and less and easy to understand, don't like me, a pile of judgment, is learning a pointer, hope to have a direction, better able to deal with the problem!

CodePudding user response:

1 system learning various algorithms
2 read the topic analysis this problem what type
3 write more than one type of their thinking to write a few times

CodePudding user response:

To understand the C pointer from the essence, must learn assembly as well as the corresponding relationship between C and assembly,
From assembly point of understanding and learning C language pointer was seemingly complicated things will become very easy!
Pointer address, "and what address?" "Only from the Angle of the assembly language and computer composition principle to explain,"
But I have to admit:
Some people like or suitable for use "first concrete to abstract" method of learning and understanding complex things;
While others like and suit to use the method of "abstract to concrete" first learn and understand the complicated things,
And I belong to the former,

don't attempt to rely on the output pointer expressions related to... The value of the [such as printf (" % p \ n ", etc.); or cout<& lt;... To understand the nature of the pointer,
And rely on the debugging of C/C + + code in the disassembly window [such as void * p=(void *) (...);] And the corresponding assembly instruction and the memory address in the memory window and memory value to understand the nature of the pointer,


Don't look at memory address in my life and memory value; Only draw list, pointer diagram, draw the stack sketch, draw sketch, even you don't have the picture and read the book only figure... Can understand understand pointer from the essence, function arguments? I doubt it!
In this life is not kind of wheat ShouMai not take to wheat mill; Only eat steamed bread, noodles, bread, and... Never seen what others even steamed bread, noodles, bread,... To understand the flour from the essence, understand pasta? I doubt it!!!!!

Remind:
"Learning" written in assembly language program
And
"VC debugging (TC) or BC with TD debugging when press Alt + 8, Alt + 7, Alt + 6 and Alt + 5, open the assembly window, stack window, memory window and registers the window to see each other C corresponding assembly, single step, and observe the corresponding stack memory and registers changes, this again is not what all understand,
(under Linux or Unix can use GDB to debug, watching each other C corresponding assembly and step to observe the corresponding change, memory and register)
Want to understand C pointer from the essence, must study the corresponding relation of C and assembly, "
Is not the same thing!

Don't superstitious books, examination questions, teachers, reply;
CPU to superstitions, compiler, debugger, run results,
And please combine "the blind man touched the sun" and "boat out to sea must carry only a compass," try to understand,
Any theory, authority, according to legend, the truth, and the standard, explain, imagination, knowledge... Is not in my eyes!

CodePudding user response:

Computer memory or file content or transport it is just a one-dimensional binary byte array and its corresponding binary address;
The human brain to a computer memory or file contents or transfer the content of the one-dimensional binary byte array and its corresponding binary address some parts as an integer, number of signed/unsigned number, floating point Numbers, complex Numbers, letters, digits, Chinese/Korean/French... Character/string, assembly instructions, functions, function parameters, heap, stack, arrays, Pointers, array pointer and pointer array, the array of arrays, pointer to pointer, two-dimensional arrays, character lattice, the coordinates of character strokes, black and white binary images and grayscale images, color images, audio, video, fingerprint information, id information...

Curb table swap any two nodes C source code (C pointer application ultimate challenge) http://download.csdn.net/detail/zhao4zhong1/5532495

CodePudding user response:

Singly linked list data structure on data sort http://bbs.csdn.net/topics/392201633

 A [B] 
* (A + B)
* (B + A)
B [A]
//the above four lines equivalent

"ABC" [1]
* (" ABC "+ 1)
* (1 + "ABC")
1 (" ABC ")
//the above four lines equivalent

A [0]
* (A)
[A] 0
//the above three lines of equivalent

CodePudding user response:

reference 1st floor lhp2013 response:
1
system learning algorithm2 read the topic analysis this problem what type
More than 3 to write more than one type of their thinking to write a few times

Understand? Can I do for you?
  • Related